You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by en...@apache.org on 2022/02/18 09:31:18 UTC
[netbeans] branch master updated: Fixed processing env variables with '=' in value
This is an automated email from the ASF dual-hosted git repository.
entl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 0f3de8c Fixed processing env variables with '=' in value
0f3de8c is described below
commit 0f3de8c2ef4387574ae9f09030eddb37c190d068
Author: Jiri Sedlacek <ji...@oracle.com>
AuthorDate: Thu Feb 17 13:14:38 2022 +0100
Fixed processing env variables with '=' in value
---
java/java.lsp.server/vscode/src/runConfiguration.ts | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/java/java.lsp.server/vscode/src/runConfiguration.ts b/java/java.lsp.server/vscode/src/runConfiguration.ts
index be6c37e..b0dbfa6 100644
--- a/java/java.lsp.server/vscode/src/runConfiguration.ts
+++ b/java/java.lsp.server/vscode/src/runConfiguration.ts
@@ -70,8 +70,11 @@ class RunConfigurationProvider implements vscode.DebugConfigurationProvider {
config.env = {};
}
for (let val of envs) {
- const vals = val.trim().split('=');
- config.env[vals[0]] = vals[1];
+ val = val.trim();
+ const div = val.indexOf('=');
+ if (div > 0) { // div === 0 means bad format (no ENV name)
+ config.env[val.substring(0, div)] = val.substring(div + 1, val.length);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists