diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-08-30 22:44:44 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-08-30 22:44:44 +0200 |
commit | 655677b4527bf2a8ce7d686755e5ab2e411e515f (patch) | |
tree | d9e63c465d1de013b17a51cba81467f73a0df917 /main.go | |
parent | 68f893390feb6d4f442add4ac4152c9cb1112019 (diff) |
Fixed error about no env config file.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 } } |