1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-08 04:04:22 +02:00
lazygit/pkg
Jesse Duffield 8c716184c1 Set working directory in lazygit test command
We need to fetch our list of tests both outside of our test binary and within. We need
to get the list from within so that we can run the code that drives the test and runs
assertions. To get the list of tests we need to know where the root of the lazygit repo
is, given that the tests live in files under that root.

So far, we've used this GetLazyRootDirectory() function for that, but it assumes that
we're not in a test directory (it just looks for the first .git dir it can find). Because
we didn't want to properly fix this before, we've been setting the working directory of
the test command to the lazygit root, and using the --path CLI arg to override it when
the test itself ran. This was a terrible hack.

Now, we're passing the lazygit root directory as an env var to the integration test, so
that we can set the working directory to the actual path of the test repo; removing the
need to use the --path arg.
2024-01-12 19:59:31 +11:00
..
app Show a friendly error message when starting lazygit from a non-existent cwd 2024-01-02 18:25:28 +00:00
cheatsheet Use go:generate for generating cheatsheets 2023-09-29 20:38:29 +02:00
commands Obtain remote URL by calling "ls-remote --get-url" instead of using git config 2024-01-10 09:24:23 +01:00
common Add AppState to common.Common 2023-09-04 17:48:39 +02:00
config Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00
constants
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes
gui Bump gocui 2024-01-10 09:39:25 +01:00
i18n Warn when there are hunks with only added lines 2024-01-10 09:11:40 +01:00
integration Set working directory in lazygit test command 2024-01-12 19:59:31 +11:00
jsonschema Add UserConfig jsonschema generation script 2023-12-02 10:46:24 +01:00
logs Remove secureexec package 2023-07-30 19:59:51 +10:00
snake
tasks Remove secureexec package 2023-07-30 19:59:51 +10:00
theme Add a "Mark commit as base commit for rebase" command 2023-07-31 08:41:41 +02:00
updates
utils Pass "now" into utils.Loader 2023-10-16 09:03:07 +02:00