mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
ci: fix Windows runner PATH casing for mise, not in cli (#25972)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4d3bfa5fab
commit
f6a4ed309f
@@ -229,15 +229,8 @@ func Test_sshConfigMatchExecEscape(t *testing.T) {
|
||||
|
||||
// OpenSSH processes %% escape sequences into %
|
||||
escaped = strings.ReplaceAll(escaped, "%%", "%")
|
||||
c := exec.Command(cmd, arg, escaped) //nolint:gosec
|
||||
if runtime.GOOS == "windows" {
|
||||
// Deduplicate Path/PATH env vars so cmd.exe
|
||||
// subprocesses (like powershell.exe used for
|
||||
// paths with spaces) resolve correctly.
|
||||
c.Env = appendAndDedupEnv(os.Environ())
|
||||
}
|
||||
b, err := c.CombinedOutput()
|
||||
require.NoError(t, err, "command output: %s", string(b))
|
||||
b, err := exec.Command(cmd, arg, escaped).CombinedOutput() //nolint:gosec
|
||||
require.NoError(t, err)
|
||||
got := strings.TrimSpace(string(b))
|
||||
require.Equal(t, "yay", got)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user