From 8434b787fad56f02c0845fce75814b2540947fab Mon Sep 17 00:00:00 2001 From: Pascal Zumkehr Date: Fri, 2 Dec 2011 18:52:57 +0100 Subject: [PATCH] prepend bin paths to PATH instead of appending it --- src/main/java/hudson/plugins/rake/Rake.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()); } }