aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 22:44:44 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 22:44:44 +0200
commit655677b4527bf2a8ce7d686755e5ab2e411e515f (patch)
treed9e63c465d1de013b17a51cba81467f73a0df917 /main.go
parent68f893390feb6d4f442add4ac4152c9cb1112019 (diff)
Fixed error about no env config file.
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.go b/main.go
index d907a44..87de43c 100644
--- a/main.go
+++ b/main.go
@@ -123,7 +123,7 @@ func main() {
},
EnvVar{
Name: "XDS_LOGFILE",
- Usage: "logging file",
+ Usage: "logging file (default: " + logFileInitial + ")",
Destination: &logFile,
},
EnvVar{
@@ -524,9 +524,10 @@ func loadConfigEnvFile(confFile, gdbCmdFile string) (map[string]string, string,
path.Join(curDir, "target"),
path.Join(u.HomeDir, ".config", "xds"),
} {
- confFile = path.Join(d, xdsEnvFile)
- log.Infof("Search config in %s", confFile)
- if common.Exists(confFile) {
+ cf := path.Join(d, xdsEnvFile)
+ log.Infof("Search config in %s", cf)
+ if common.Exists(cf) {
+ confFile = cf
break
}
}