summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-27 16:17:26 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-29 17:42:07 +1000
commit75598ea2a1a561b6cdba88d9763e134412a2eb04 (patch)
treeb427a1b072541d46d917bd1e8668d4e4256b342f /main.go
parente8738161603b5d9844f690214cee7e570a93d5a1 (diff)
move git dir env stuff into a centralised package
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 96665782c..781345443 100644
--- a/main.go
+++ b/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 {