Skip to content

Commit

Permalink
LegacyCompatibleGitAPIImpl, etc: reconcile code style with changes in…
Browse files Browse the repository at this point in the history
… the PR jenkinsci#644 (by @MarkEWaite) and fix some
  • Loading branch information
jimklimov committed Jun 14, 2023
1 parent 26fba6b commit 26059aa
Show file tree
Hide file tree
Showing 2 changed files with 296 additions and 141 deletions.
14 changes: 9 additions & 5 deletions src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2963,11 +2963,15 @@ private String launchCommandIn(ArgumentListBuilder args, File workDir, EnvVars e

if (status != 0) {
if (workDir == null)
workDir = java.nio.file.Paths.get(".").toAbsolutePath().normalize().toFile();
throw new GitException("Command \"" + command +
"\" executed in workdir \"" + workDir.toString() +
"\" returned status code " + status +
":\nstdout: " + stdout + "\nstderr: " + stderr);
workDir = java.nio.file.Paths.get(".")
.toAbsolutePath()
.normalize()
.toFile();
throw new GitException("Command \"" + command
+ "\" executed in workdir \"" + workDir.toString()
+ "\" returned status code " + status
+ ":\nstdout: " + stdout
+ "\nstderr: " + stderr);
}

return stdout;
Expand Down
Loading

0 comments on commit 26059aa

Please sign in to comment.