Commit 2ba88e35 authored by Christian Wulf's avatar Christian Wulf

removed two exceptions and added two log msgs instead

parent 371c15fb
......@@ -32,7 +32,9 @@ public class CommandLineGitProvider implements GitProvider {
gitFile = EnvironmentVariable.findExecutableOnPath("git.exe");
}
if (gitFile == null) {
throw new IllegalStateException("'git' is not in PATH");
//throw new IllegalStateException("'git' is not in PATH");
logger.error("'git' is not in the PATH. Add 'git' to the PATH and restart the application.");
return "'git' is not in the PATH.";
}
logger.logGitFilename(gitFile.getAbsolutePath());
return gitFile.getName();
......@@ -44,7 +46,11 @@ public class CommandLineGitProvider implements GitProvider {
}
private void execSynchronously(final File workingDir, final String... cmdArray) {
if (!workingDir.exists()) throw new IllegalStateException("File not found: " + workingDir);
if (!workingDir.exists()) {
// throw new IllegalStateException("File not found: " + workingDir);
logger.error("File not found: " + workingDir);
return;
}
logger.logWorkingDir(workingDir.getAbsolutePath());
logger.logNativeCommand(cmdArray);
Process process = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment