Allow specifying absolute paths in -c command line option.

Closes #424.
This commit is contained in:
Eugene Bujak 2018-11-26 15:18:56 +03:00
parent d9a65631b9
commit d2a0d03332

5
app.go
View File

@ -213,7 +213,10 @@ func promptAndGetPassword(prompt string) (string, error) {
}
func askUsernamePasswordIfPossible() error {
configfile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
configfile := config.ourConfigFilename
if !filepath.IsAbs(configfile) {
configfile = filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
}
_, err := os.Stat(configfile)
if !os.IsNotExist(err) {
// do nothing, file exists