Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make etc/scripts/get-stack.sh respect the -d argument #3366

Merged
merged 2 commits into from
Aug 21, 2017
Merged

Make etc/scripts/get-stack.sh respect the -d argument #3366

merged 2 commits into from
Aug 21, 2017

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.
@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.

None yet

2 participants