mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
move git dir env stuff into a centralised package
This commit is contained in:
5
main.go
5
main.go
@ -11,6 +11,7 @@ import (
|
||||
"github.com/integrii/flaggy"
|
||||
"github.com/jesseduffield/lazygit/pkg/app"
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
"github.com/jesseduffield/lazygit/pkg/env"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -63,11 +64,11 @@ func main() {
|
||||
}
|
||||
|
||||
if workTree != "" {
|
||||
os.Setenv("GIT_WORK_TREE", workTree)
|
||||
env.SetGitWorkTreeEnv(workTree)
|
||||
}
|
||||
|
||||
if gitDir != "" {
|
||||
os.Setenv("GIT_DIR", gitDir)
|
||||
env.SetGitDirEnv(gitDir)
|
||||
}
|
||||
|
||||
if versionFlag {
|
||||
|
Reference in New Issue
Block a user