Skip to content

fix: flaky install.sh upgrade on OSX (zsh killed) #2309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove binary exists
  • Loading branch information
ben@coder.com committed Jun 13, 2022
commit ddb95a3701946b39c350d854a8fb19f9cb975a34
14 changes: 12 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ echo_latest_version() {

echo_standalone_postinstall() {
cath <<EOF
Standalone release has been installed into $STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME

Standalone release has been installed into $STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME
Comment on lines -88 to +89
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did a lil bit of formatting here


EOF

Expand Down Expand Up @@ -391,7 +392,16 @@ install_standalone() {
"$sh_c" unzip -d "$CACHE_DIR" -o "$CACHE_DIR/coder_${VERSION}_${OS}_${ARCH}.zip"
fi

"$sh_c" cp "$CACHE_DIR/coder" "$STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME"
COPY_LOCATION="$STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME"

# Remove the file if it already exists to
# avoid https://github.com/coder/coder/issues/2086
if [ -f "$COPY_LOCATION" ]; then
"$sh_c" rm $COPY_LOCATION
fi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Copy the binary to the correct location.
"$sh_c" cp "$CACHE_DIR/coder" "$COPY_LOCATION"

echo_standalone_postinstall
}
Expand Down