mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 08:06:25 -04:00
Change directory to worktree if given as an argument
Previously we used an env var for this and it's not clear to me how that worked but with this PR current directory = worktree directory
This commit is contained in:
parent
b79d19e0a7
commit
47717802f8
|
|
@ -76,7 +76,10 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
|
|||
}
|
||||
|
||||
if cliArgs.WorkTree != "" {
|
||||
env.SetGitWorkTreeEnv(cliArgs.WorkTree)
|
||||
err := os.Chdir(cliArgs.WorkTree)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to change directory to %s: %v", cliArgs.WorkTree, err)
|
||||
}
|
||||
}
|
||||
|
||||
if cliArgs.GitDir != "" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue