Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4822e1

Browse files
committed
fix: Prefix tmp directory for agent download with "coder"
This makes it easier to find the temporary dir for the coder binary.
1 parent 88e30be commit e4822e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

provisionersdk/agent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Start-Process -FilePath $env:TEMP\sshd.exe -ArgumentList "agent" -PassThru
2323
"amd64": `
2424
#!/usr/bin/env sh
2525
set -eu pipefail
26-
export BINARY_LOCATION=$(mktemp -d)/coder
26+
export BINARY_LOCATION=$(mktemp -d -t tmp.coderXXXXX)/coder
2727
curl -fsSL ${ACCESS_URL}bin/coder-linux-amd64 -o $BINARY_LOCATION
2828
chmod +x $BINARY_LOCATION
2929
export CODER_AUTH="${AUTH_TYPE}"
@@ -35,7 +35,7 @@ exec $BINARY_LOCATION agent
3535
"amd64": `
3636
#!/usr/bin/env sh
3737
set -eu pipefail
38-
export BINARY_LOCATION=$(mktemp -d)/coder
38+
export BINARY_LOCATION=$(mktemp -d -t tmp.coderXXXXX)/coder
3939
curl -fsSL ${ACCESS_URL}bin/coder-darwin-amd64 -o $BINARY_LOCATION
4040
chmod +x $BINARY_LOCATION
4141
export CODER_AUTH="${AUTH_TYPE}"

0 commit comments

Comments
 (0)