File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ echo_latest_version() {
85
85
86
86
echo_standalone_postinstall () {
87
87
cath << EOF
88
- Standalone release has been installed into $STANDALONE_INSTALL_PREFIX /bin/$STANDALONE_BINARY_NAME
88
+
89
+ Standalone release has been installed into $STANDALONE_INSTALL_PREFIX /bin/$STANDALONE_BINARY_NAME
89
90
90
91
EOF
91
92
@@ -391,7 +392,16 @@ install_standalone() {
391
392
" $sh_c " unzip -d " $CACHE_DIR " -o " $CACHE_DIR /coder_${VERSION} _${OS} _${ARCH} .zip"
392
393
fi
393
394
394
- " $sh_c " cp " $CACHE_DIR /coder" " $STANDALONE_INSTALL_PREFIX /bin/$STANDALONE_BINARY_NAME "
395
+ COPY_LOCATION=" $STANDALONE_INSTALL_PREFIX /bin/$STANDALONE_BINARY_NAME "
396
+
397
+ # Remove the file if it already exists to
398
+ # avoid https://github.com/coder/coder/issues/2086
399
+ if [ -f " $COPY_LOCATION " ]; then
400
+ " $sh_c " rm " $COPY_LOCATION "
401
+ fi
402
+
403
+ # Copy the binary to the correct location.
404
+ " $sh_c " cp " $CACHE_DIR /coder" " $COPY_LOCATION "
395
405
396
406
echo_standalone_postinstall
397
407
}
You can’t perform that action at this time.
0 commit comments