Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Commit

Permalink
LANG: add tool directory to beginning of PATH, not end.
Browse files Browse the repository at this point in the history
Conflicts:
	documentation/ChangeLog.md
  • Loading branch information
bruno-medeiros committed Aug 24, 2015
1 parent bb48c8f commit 41aab47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions documentation/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## release ChangeLog

### (NextVersion)
* Fixed: when invoking toolchain programs, add tool directory to beginning of PATH, not end.
* Fixed: In Linux, the "Build Target" group UI widget height is broken, too short. (#150)
* Fixed: if build tool reports many error messages, the Eclipse project build will take too long to finish.
* Added UserGuide note about using Homebrew GDB in OS X.
Expand Down
6 changes: 3 additions & 3 deletions plugin_tooling/src-lang/melnorme/lang/utils/ProcessUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import melnorme.utilbox.core.CommonException;
import melnorme.utilbox.misc.Location;
import melnorme.utilbox.misc.MiscUtil;
import melnorme.utilbox.misc.StringUtil;

public class ProcessUtils {

Expand Down Expand Up @@ -69,10 +70,9 @@ public static void addDirToPathEnv(Path cmdExePath, ProcessBuilder pb) {
return;
}

pathEnv = (pathEnv == null) ? "" : pathEnv + File.pathSeparator;
pathEnv += cmdDir.toString();
String newPathEnv = cmdDir.toString() + File.pathSeparator + StringUtil.nullAsEmpty(pathEnv);

putVarInEnvMap(environment, "PATH", pathEnv);
putVarInEnvMap(environment, "PATH", newPathEnv);
}

public static String getVarFromEnvMap(Map<String, String> envMap, String key) {
Expand Down

0 comments on commit 41aab47

Please sign in to comment.