Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

defensive

  • Loading branch information...
commit 0f0bb094429f2f7fb713815e725986e17dca6b90 1 parent 1c6fe2f
@JPMoresmau authored
View
8 net.sf.eclipsefp.haskell.buildwrapper/src/net/sf/eclipsefp/haskell/buildwrapper/BWFacade.java
@@ -1105,8 +1105,12 @@ private synchronized void addBuildWrapperPath(ProcessBuilder pb){
if (path!=null){
Map<String,String> env=pb.environment();
String pathValue=env.get("PATH");
- if (Boolean.TRUE.equals(needPath) || !pathValue.contains(path)){
- pathValue+=File.pathSeparator+path;
+ if (Boolean.TRUE.equals(needPath) || pathValue==null || pathValue.length()==0 || !pathValue.contains(path)){
+ if (pathValue==null || pathValue.length()==0){
+ pathValue=path;
+ } else {
+ pathValue+=File.pathSeparator+path;
+ }
env.put("PATH",pathValue);
needPath=true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.