Skip to content

Commit d7cacc5

Browse files
committed
Warn if the working directory doesn't exist.
1 parent f8a515c commit d7cacc5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/GitVersionExe/Program.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ static int VerifyArgumentsAndRun()
6464
}
6565

6666
ConfigureLogging(arguments);
67+
68+
if (!Directory.Exists(arguments.TargetPath))
69+
{
70+
Logger.WriteWarning(string.Format("The working directory '{0}' does not exist.", arguments.TargetPath));
71+
}
72+
else
73+
{
74+
Logger.WriteInfo("Working directory: " + arguments.TargetPath);
75+
}
76+
6777
if (arguments.Init)
6878
{
6979
ConfigurationProvider.Init(arguments.TargetPath, fileSystem, new ConsoleAdapter());
@@ -80,8 +90,6 @@ static int VerifyArgumentsAndRun()
8090
arguments.Output = OutputType.BuildServer;
8191
}
8292

83-
Logger.WriteInfo("Working directory: " + arguments.TargetPath);
84-
8593
SpecifiedArgumentRunner.Run(arguments, fileSystem);
8694
}
8795
catch (WarningException exception)

0 commit comments

Comments
 (0)