mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-10 20:05:50 +02:00
move git dir env stuff into a centralised package
This commit is contained in:
parent
e873816160
commit
75598ea2a1
6 changed files with 49 additions and 19 deletions
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue