Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb90ced

Browse files
authored
Fix global flags escaping when starting a workspace using the CLI (#592)
Closes#591
1 parentbd09ae6 commitbb90ced

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/api/workspace.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Workspace } from "coder/site/src/api/typesGenerated";
44
import*asvscodefrom"vscode";
55
import{FeatureSet}from"../featureSet";
66
import{getGlobalFlags}from"../globalFlags";
7+
import{escapeCommandArg}from"../util";
78
import{errToStr,createWorkspaceIdentifier}from"./api-helper";
89
import{CoderApi}from"./coderApi";
910

@@ -36,7 +37,9 @@ export async function startWorkspaceIfStoppedOrFailed(
3637
startArgs.push(...["--reason","vscode_connection"]);
3738
}
3839

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});
4043

4144
startProcess.stdout.on("data",(data:Buffer)=>{
4245
data

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp