mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: flaky install.sh upgrade on OSX (zsh killed) (#2309)
* remove binary exists * fix lint and format errors Co-authored-by: ben@coder.com <benpotter@bens-mbp.lan>
This commit is contained in:
co-authored by
ben@coder.com
parent
55e538e854
commit
8f7dbee813
+12
-2
@@ -85,7 +85,8 @@ echo_latest_version() {
|
|||||||
|
|
||||||
echo_standalone_postinstall() {
|
echo_standalone_postinstall() {
|
||||||
cath <<EOF
|
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
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -391,7 +392,16 @@ install_standalone() {
|
|||||||
"$sh_c" unzip -d "$CACHE_DIR" -o "$CACHE_DIR/coder_${VERSION}_${OS}_${ARCH}.zip"
|
"$sh_c" unzip -d "$CACHE_DIR" -o "$CACHE_DIR/coder_${VERSION}_${OS}_${ARCH}.zip"
|
||||||
fi
|
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 the binary to the correct location.
|
||||||
|
"$sh_c" cp "$CACHE_DIR/coder" "$COPY_LOCATION"
|
||||||
|
|
||||||
echo_standalone_postinstall
|
echo_standalone_postinstall
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user