Skip to content

Commit c991d37

Browse files
committed
[JVSC-300] Remove quoting in nbcode launch arguments
- The nbcode executable is launched from the ts/js extension using Node's `child_process.spawn` function. - This function directly launches the command in a new process. It does NOT create a shell to execute it. - Therefore, quoting the arguments passed to prevent shell splitting is not required. - In fact, due to the presence of extra quotes, it may lead to incorrect splitting of arguments with spaces in them. - This is the cause for the initialization failure of the extension nbls when the project folder opened contains spaces in its path. - Fixed *nbcode.ts* to remove the extra quotes added for some of the option values. Closes #300 Signed-off-by: Siddharth Srinivasan <[email protected]>
1 parent e09009b commit c991d37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vscode/src/nbcode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ export function launch(
105105
}
106106

107107
if (info.projectSearchRoots) {
108-
ideArgs.push(`-J-Dproject.limitScanRoot="${info.projectSearchRoots}"`);
108+
ideArgs.push(`-J-Dproject.limitScanRoot=${info.projectSearchRoots}`);
109109
}
110110

111111
if (info.verbose) {
112112
ideArgs.push('-J-Dnetbeans.logger.console=true');
113113
}
114-
ideArgs.push(`-J-Dnetbeans.extra.dirs="${clusterPath}"`)
114+
ideArgs.push(`-J-Dnetbeans.extra.dirs=${clusterPath}`)
115115
if (env['netbeans.extra.options']) {
116116
ideArgs.push(...env['netbeans.extra.options'].split(' '));
117117
}

0 commit comments

Comments
 (0)