diff --git a/esv.d b/esv.d index 186902f..dc2e7f6 100644 --- a/esv.d +++ b/esv.d @@ -108,12 +108,12 @@ config: configPath = environment.get(cf.configEnv, cf.configPath) .expandTilde(); try { - if (cFlag) { + if (cFlag) configPath = cFlag.expandTilde(); - } else { - if (!configPath.exists()) { - mkdirRecurse(dirName(configPath)); - configPath.write(format! + + if (!configPath.exists()) { + mkdirRecurse(dirName(configPath)); + configPath.write(format! "## Configuration file for esv. # An API key is required to access the ESV Bible API. @@ -127,7 +127,6 @@ key = %s #passage-references = false #verse-numbers = false "(cf.apiKey)); - } } readINIFile(ini, configPath); } catch (FileException e) {