Merge pull request #110 in DNS/adguard-dns from bugfix/424 to master
* commit 'd2a0d0333241d8f31718e4e8765f57d9ec68f7df': Allow specifying absolute paths in -c command line option.
This commit is contained in:
commit
c995726f78
5
app.go
5
app.go
|
@ -213,7 +213,10 @@ func promptAndGetPassword(prompt string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func askUsernamePasswordIfPossible() 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)
|
_, err := os.Stat(configfile)
|
||||||
if !os.IsNotExist(err) {
|
if !os.IsNotExist(err) {
|
||||||
// do nothing, file exists
|
// do nothing, file exists
|
||||||
|
|
Loading…
Reference in New Issue