Skip to content

Conversation

@decentral1se
Copy link
Member

@decentral1se decentral1se commented Aug 19, 2017

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

This change now makes the install script use the -d {path} value when checking for existing stack executables. Should close off #3350. Arguably, we should also use realpath for the 'Installing Stack to: ...' message, no?

Here's my test logs (click dropdown):

Before
λ ~/hobby/stack/ master mkdir foobar
λ ~/hobby/stack/ master cd foobar     
λ ~/hobby/stack/foobar/ master less ../etc/scripts/get-stack.sh | sh -s - -d .    
Stack Version 1.5.1 already appears to be installed at:
  /home/lwm/.local/bin/stack
Use 'stack upgrade' or your OS's package manager to upgrade,
or pass '-f' to this script to over-write the existing binary, e.g.:
  curl -sSL https://get.haskellstack.org/ | sh -s - -f
After
λ ~/hobby/stack/ fixup-3350 mkdir foobar
λ ~/hobby/stack/ fixup-3350 cd foobar                                              
λ ~/hobby/stack/foobar/ fixup-3350 less ../etc/scripts/get-stack.sh | sh -s - -d .
... (regular install logs)
λ ~/hobby/stack/foobar/ fixup-3350* less ../etc/scripts/get-stack.sh | sh -s - -d .
Stack Version 1.5.1 already appears to be installed at:
  /home/lwm/hobby/stack/foobar/stack
Use 'stack upgrade' or your OS's package manager to upgrade,
or pass '-f' to this script to over-write the existing binary, e.g.:
  curl -sSL https://get.haskellstack.org/ | sh -s - -f
λ ~/hobby/stack/foobar/ fixup-3350* less ../etc/scripts/get-stack.sh | sh -s - -d . -f
... (regular install logs)
Installing Stack to: ./stack...

-------------------------------------------------------------------------------

Stack has been installed to: ./stack

WARNING: '.' is not on your PATH.

$DEST is really checked inside the function body, not
just `/usr/local/bin/`, so this comment is amended.
@decentral1se decentral1se requested a review from borsboom August 20, 2017 09:51
@borsboom
Copy link
Contributor

Looks good, thanks!

@borsboom borsboom merged commit 7b4b10b into commercialhaskell:master Aug 21, 2017
@decentral1se decentral1se deleted the fixup-3350 branch August 22, 2017 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants