ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 848] Changed - <exec>'s <env> does not set environment variables correctly.
Date Sun, 11 Mar 2001 07:52:45 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=848

*** shadow/848	Mon Mar  5 23:41:41 2001
--- shadow/848.tmp.19734	Sat Mar 10 23:52:45 2001
***************
*** 39,41 ****
--- 39,68 ----
  
  I've run your example on Linux (using env as the executable), both Path and
  JAVA_HOME have been set correctly - seems to be a Windows specific problem.
+ 
+ 
+ ------- Additional Comments From trelawny@pacbell.net  2001-03-10 23:52 -------
+ Windows behaviour can be set by using the following patch (it breaks Unix 
+ behaivour). I do not know what is the best way to determine whether the system 
+ is Windows based.
+ The patch:
+ 369c369,370
+ <             int pos = env[i].indexOf('=');
+ ---
+ >             String envstr=env[i];
+ >             int pos = envstr.indexOf('=');
+ 371a373
+ >             int keylen=key.length();
+ 374c376,377
+ <                 if (((String)osEnv.elementAt(j)).startsWith(key)) {
+ ---
+ >                 String env_item=(String)osEnv.elementAt(j);
+ >                 if (env_item.length()>=keylen&& env_item.substring(0, 
+ keylen).equalsIgnoreCase(key)) {
+ 375a379
+ >                     envstr=env_item.substring(0, keylen)+envstr.substring
+ (keylen);
+ 379c383
+ <             osEnv.addElement(env[i]);
+ ---
+ >             osEnv.addElement(envstr);

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org


Mime
View raw message