Skip to content

Commit e07a591

Browse files
committed
Catch cloud agent download failure
- See #2251 and #2229.
1 parent 676c7bf commit e07a591

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ci/build/npm-postinstall.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ main() {
2525
esac
2626

2727
OS="$(uname | tr '[:upper:]' '[:lower:]')"
28-
curl -fsSL "https://storage.googleapis.com/coder-cloud-releases/agent/latest/$OS/cloud-agent" -o ./lib/coder-cloud-agent
29-
chmod +x ./lib/coder-cloud-agent
28+
if curl -fsSL "https://storage.googleapis.com/coder-cloud-releases/agent/latest/$OS/cloud-agent" -o ./lib/coder-cloud-agent ; then
29+
chmod +x ./lib/coder-cloud-agent
30+
else
31+
echo "Failed to download cloud agent; --link will not work"
32+
fi
3033

3134
if ! vscode_yarn; then
3235
echo "You may not have the required dependencies to build the native modules."

0 commit comments

Comments
 (0)