esv: initialise cFlag to null
Before this change a user could pass an empty string as the argument to -C and it would go undetected.
This commit is contained in:
parent
8f699c3212
commit
3507d9ca24
1 changed files with 3 additions and 1 deletions
4
esv.d
4
esv.d
|
@ -58,6 +58,8 @@ main(string[] args)
|
|||
|
||||
sharedInit(args);
|
||||
|
||||
cFlag = null;
|
||||
|
||||
/* Parse command-line options */
|
||||
try {
|
||||
import std.getopt : config;
|
||||
|
@ -106,7 +108,7 @@ config:
|
|||
configPath = environment.get(cf.configEnv, cf.configPath)
|
||||
.expandTilde();
|
||||
try {
|
||||
if (cFlag != "") { /* if -c was given */
|
||||
if (cFlag) {
|
||||
configPath = cFlag.expandTilde();
|
||||
} else {
|
||||
if (!configPath.exists()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue