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

get-stack.sh script does not first apt-get update #2898

Closed
snoyberg opened this issue Jan 5, 2017 · 5 comments
Closed

get-stack.sh script does not first apt-get update #2898

snoyberg opened this issue Jan 5, 2017 · 5 comments

Comments

@snoyberg
Copy link
Contributor

snoyberg commented Jan 5, 2017

Actions:

  1. Spin up brand new Ubuntu 16.04 EC2 instance
  2. Run the get-started script via wget -qO- https://get.haskellstack.org/ | sh

Expected:

All system packages will be installed

Actual:

I get an error message because I haven't yet run apt-get update, system package installation fails, but Stack installation succeeds. In order to get the necessary packages, I then need to either (1) manually apt-get install them, or delete /usr/local/bin/stack and rerun the script after running apt-get update. I would expect one of two behaviors to occur:

  1. If system package installation fails, do not install the stack exe
  2. If apt-get install fails, run apt-get update

I'm guessing the former is more practical, while the latter could be tweaked to always run apt-get update

@borsboom
Copy link
Contributor

borsboom commented Jan 5, 2017

Yeah, I think option 1 with a friendly error message ("please run apt-get update and try again" or the equivalent for yum/dnf/apk) is the way to go.

@alexeyzab
Copy link
Collaborator

Hey there! I would like to try implementing this. Here's what I have so far, let me know if this is the right way to approach it. If it is, I'll go ahead and add similar functionality for yum/dnf/apk. Thanks!

@borsboom
Copy link
Contributor

@alexeyzab That looks like the right approach to me!

@alexeyzab
Copy link
Collaborator

@borsboom Great! I've added similar warnings for other package managers.

@borsboom
Copy link
Contributor

Fixed by #2909

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

No branches or pull requests

3 participants