Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-02-12 02:40:54 -0500
committerUwe Stieber2014-02-12 02:40:54 -0500
commit84d7f1e54017511eb7de145b4a53cac28bb611bb (patch)
treeb67ea545749ec7f7d5965475002cae83c68d9cc1
parent10af684d87d8aa2b86666e533d4217f816c502ef (diff)
downloadorg.eclipse.tcf-84d7f1e54017511eb7de145b4a53cac28bb611bb.tar.gz
org.eclipse.tcf-84d7f1e54017511eb7de145b4a53cac28bb611bb.tar.xz
org.eclipse.tcf-84d7f1e54017511eb7de145b4a53cac28bb611bb.zip
Target Explorer: Environment variables without values ignored on Windows only
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java
index 5d92ca9ae..c9943df5f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java
@@ -90,11 +90,11 @@ public class Env {
if ("".equals(name.trim()) || name.contains("=") || name.contains(":")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
continue;
}
+ // If the variable has no value, ignore the variable
+ if (parts.length < 2) continue;
}
- // If the variable has no value, ignore the variable
- if (parts.length < 2) continue;
// Get the variable value
- String value = parts[1].trim();
+ String value = parts.length > 1 ? parts[1].trim() : ""; //$NON-NLS-1$
// Don't overwrite the TERM variable if in terminal mode
if (terminal && "TERM".equals(name)) continue; //$NON-NLS-1$
// If a variable with the name does not exist, just append it

Back to the top