diff --git a/src/main/java/hudson/plugins/rake/Rake.java b/src/main/java/hudson/plugins/rake/Rake.java index 2bfbfc0..b149098 100644 --- a/src/main/java/hudson/plugins/rake/Rake.java +++ b/src/main/java/hudson/plugins/rake/Rake.java @@ -128,12 +128,13 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListene } if (rake.getBinPath() != null) { StringBuilder builder = new StringBuilder(); + builder.append(rake.getBinPath()); + String path = env.get("PATH"); if (path != null) { - builder.append(path).append(File.pathSeparator); + builder.append(File.pathSeparator).append(path); } - builder.append(rake.getBinPath()); env.put("PATH", builder.toString()); } }