File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { Workspace } from "coder/site/src/api/typesGenerated";
44import * as vscode from "vscode" ;
55import { FeatureSet } from "../featureSet" ;
66import { getGlobalFlags } from "../globalFlags" ;
7+ import { escapeCommandArg } from "../util" ;
78import { errToStr , createWorkspaceIdentifier } from "./api-helper" ;
89import { CoderApi } from "./coderApi" ;
910
@@ -36,7 +37,9 @@ export async function startWorkspaceIfStoppedOrFailed(
3637 startArgs . push ( ...[ "--reason" , "vscode_connection" ] ) ;
3738 }
3839
39- const startProcess = spawn ( binPath , startArgs , { shell : true } ) ;
40+ // { shell: true } requires one shell-safe command string, otherwise we lose all escaping
41+ const cmd = `${ escapeCommandArg ( binPath ) } ${ startArgs . join ( " " ) } ` ;
42+ const startProcess = spawn ( cmd , { shell : true } ) ;
4043
4144 startProcess . stdout . on ( "data" , ( data : Buffer ) => {
4245 data
You can’t perform that action at this time.
0 commit comments