A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/commercialhaskell/stack/issues/3232 below:

Improved PATH-aware behavior for `stack upgrade` · Issue #3232 · commercialhaskell/stack · GitHub

Problem: users will often run the install script and end up with stack in /usr/local/bin, and when they run stack upgrade, are surprised that the next stack call still uses the old version. To mitigate this, @borsboom and I propose:

  1. stack upgrade continues to copy the executable to ~/.local/bin as it has until now
  2. If the current Stack executable is running from there: we're done. Otherwise: continue.
  3. Attempt to copy the stack executable to the location of the current executables.
  4. If that fails with a permission denied error:
    1. Explain the situation to the user, and recommend copying from source file path to dest file path
    2. Ask if the user wants us to try to use sudo to perform the copy (and explain that it may fail due to OS specific things)
    3. If the user says yes, try running sudo cp ..., and potentially similar commands with su.

Presumably we won't even bother trying this on Windows.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4