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

Commit5de812f

Browse files
committed
fix(agent/agentcontainers): remove shellquote in favor of %q
Shellquote modified `{{.Name}}` to `\{\{.Name}}` breaking Fish, byswitching to quoting each arg individually we should have a moreportable (across shells) implementation.
1 parentcd484db commit5de812f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎agent/agentcontainers/execer.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package agentcontainers
22

33
import (
44
"context"
5+
"fmt"
56
"os/exec"
67
"runtime"
7-
8-
"github.com/kballard/go-shellquote"
8+
"strings"
99

1010
"cdr.dev/slog"
1111
"github.com/coder/coder/v2/agent/agentexec"
@@ -56,7 +56,10 @@ func (e *commandEnvExecer) prepare(ctx context.Context, inName string, inArgs ..
5656
caller="/c"
5757
}
5858
name=shell
59-
args= []string{caller,shellquote.Join(append([]string{inName},inArgs...)...)}
59+
for_,arg:=rangeinArgs {
60+
args=append(args,fmt.Sprintf("%q",arg))
61+
}
62+
args= []string{caller,strings.Join(args," ")}
6063
returnname,args,dir,env
6164
}
6265

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp