We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentbd09ae6 commitbb90cedCopy full SHA for bb90ced
src/api/workspace.ts
@@ -4,6 +4,7 @@ import { Workspace } from "coder/site/src/api/typesGenerated";
4
import*asvscodefrom"vscode";
5
import{FeatureSet}from"../featureSet";
6
import{getGlobalFlags}from"../globalFlags";
7
+import{escapeCommandArg}from"../util";
8
import{errToStr,createWorkspaceIdentifier}from"./api-helper";
9
import{CoderApi}from"./coderApi";
10
@@ -36,7 +37,9 @@ export async function startWorkspaceIfStoppedOrFailed(
36
37
startArgs.push(...["--reason","vscode_connection"]);
38
}
39
-conststartProcess=spawn(binPath,startArgs,{shell:true});
40
+// { shell: true } requires one shell-safe command string, otherwise we lose all escaping
41
+constcmd=`${escapeCommandArg(binPath)}${startArgs.join(" ")}`;
42
+conststartProcess=spawn(cmd,{shell:true});
43
44
startProcess.stdout.on("data",(data:Buffer)=>{
45
data