Skip to content

Commit e0814c0

Browse files
committed
get-stack: clarify how to pass '-f' to upgrade (#3297)
1 parent eeca277 commit e0814c0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

etc/scripts/get-stack.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,16 @@ check_stack_installed() {
658658
if [ "$FORCE" = "true" ] ; then
659659
[ "$DEST" != "" ] || DEST="$(stack_location)"
660660
else
661+
if has_curl; then
662+
get="curl -sSL"
663+
else
664+
get="wget -qO-"
665+
fi
661666
die "Stack $(stack_version) already appears to be installed at:
662667
$(stack_location)
663668
Use 'stack upgrade' or your OS's package manager to upgrade,
664-
or pass '-f' to this script to over-write the existing binary."
669+
or pass '-f' to this script to over-write the existing binary, e.g.:
670+
$get https://get.haskellstack.org/ | sh -s - -f"
665671
fi
666672
else
667673
[ "$DEST" != "" ] || DEST="$DEFAULT_DEST"

0 commit comments

Comments
 (0)