Skip to content

Commit db9d5b7

Browse files
authored
fix: Rename coder to sshd on Windows for VS Code Remote support (#974)
On Windows, VS Code Remote requires a parent process of the executing shell to be named sshd, otherwise it fails. See: microsoft/vscode-remote-release#5699
1 parent e8b1a57 commit db9d5b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

provisionersdk/agent.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ var (
77
// to agent install and run script. ${DOWNLOAD_URL} is replaced
88
// with strings.ReplaceAll() when being consumed.
99
agentScripts = map[string]map[string]string{
10+
// On Windows, VS Code Remote requires a parent process of the
11+
// executing shell to be named "sshd", otherwise it fails. See:
12+
// https://github.com/microsoft/vscode-remote-release/issues/5699
1013
"windows": {
1114
"amd64": `
1215
$ProgressPreference = "SilentlyContinue"
13-
Invoke-WebRequest -Uri ${ACCESS_URL}bin/coder-windows-amd64.exe -OutFile $env:TEMP\coder.exe
16+
Invoke-WebRequest -Uri ${ACCESS_URL}bin/coder-windows-amd64.exe -OutFile $env:TEMP\sshd.exe
1417
$env:CODER_AUTH = "${AUTH_TYPE}"
1518
$env:CODER_URL = "${ACCESS_URL}"
16-
Start-Process -FilePath $env:TEMP\coder.exe -ArgumentList "workspaces","agent" -PassThru
19+
Start-Process -FilePath $env:TEMP\sshd.exe -ArgumentList "workspaces","agent" -PassThru
1720
`,
1821
},
1922
"linux": {

0 commit comments

Comments
 (0)