Skip to content

Commit 7781bb9

Browse files
authored
Merge pull request #455 from adamralph/fix-work-dir-precedence
fix working directory precedence in CLI
2 parents f8c4a95 + b1f36b1 commit 7781bb9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

minver-cli/Program.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ private static int Main(string[] args)
4444
}
4545
#endif
4646

47-
if (!string.IsNullOrEmpty(workDirArg.Value) && !Directory.Exists(workDir = workDirArg.Value))
47+
if (!string.IsNullOrEmpty(workDirArg.Value))
4848
{
49-
Logger.ErrorWorkDirDoesNotExist(workDirArg.Value);
50-
return 2;
49+
if (!Directory.Exists(workDir = workDirArg.Value))
50+
{
51+
Logger.ErrorWorkDirDoesNotExist(workDirArg.Value);
52+
return 2;
53+
}
5154
}
5255
#if MINVER_CLI
5356
else if (!string.IsNullOrEmpty(workDirOption.Value()) && !Directory.Exists(workDir = workDirOption.Value()))

0 commit comments

Comments
 (0)