Skip to content

Commit ef96727

Browse files
authored
fix(install): Add -o flag to unzip to match tar (starship#3727)
By default, unzip will attempt to query the user when files to be installed already exist. Unfortunately, if the install script is run with `sh -s`, unzip will read the remaining portion of the script as input, resulting in a mess on the terminal. This commit changes the unzip behavior to clobber existing files: this already happens for platforms using tar, so it's not hugely breaking (and I could find no evidence that we believe this is more likely to cause issues on Windows)
1 parent a85f654 commit ef96727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install/install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ unpack() {
116116
return 0
117117
;;
118118
*.zip)
119-
flags=$(test -z "${VERBOSE-}" && echo "-qq" || echo "")
119+
flags=$(test -z "${VERBOSE-}" && echo "-qqo" || echo "-o")
120120
UNZIP="${flags}" ${sudo} unzip "${archive}" -d "${bin_dir}"
121121
return 0
122122
;;

0 commit comments

Comments
 (0)