summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-02-18 21:29:43 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-02-18 21:29:43 +1100
commit76a27f417fc7fd24b4fdf12f0aeeb94ecca958d3 (patch)
tree2c75a15e6facb18b1f5ff1831cf67d5664b796dd /pkg/config
parentadc252901944e84433cb8a50de9b114ba120282d (diff)
rename any commit
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/app_config.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index b5052fc12..9ac2fb904 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -3,6 +3,7 @@ package config
import (
"bytes"
"io/ioutil"
+ "os"
"path/filepath"
"github.com/shibukawa/configdir"
@@ -42,18 +43,22 @@ type AppConfigurer interface {
}
// NewAppConfig makes a new app config
-func NewAppConfig(name, version, commit, date string, buildSource string, debuggingFlag *bool) (*AppConfig, error) {
+func NewAppConfig(name, version, commit, date string, buildSource string, debuggingFlag bool) (*AppConfig, error) {
userConfig, err := LoadConfig("config", true)
if err != nil {
return nil, err
}
+ if os.Getenv("DEBUG") == "TRUE" {
+ debuggingFlag = true
+ }
+
appConfig := &AppConfig{
Name: "lazygit",
Version: version,
Commit: commit,
BuildDate: date,
- Debug: *debuggingFlag,
+ Debug: debuggingFlag,
BuildSource: buildSource,
UserConfig: userConfig,
AppState: &AppState{},