Add flag to disable network access
Currently, as an example, ghcup set ghc 8.8.4
goes out to the network even if GHC 8.8.4 is already downloaded by ghcup, I guess to inform the user if there's a newer version available. This can cause problems if e.g. you put it in your .profile
, or some build script, that should work regardless of network status.
So the feature request here is to add a flag to ghcup
to only do what it can do locally and fail otherwise. For example, ghcup --no-network set ghc 8.10.1
would succeed (and not initiate any network connections) if GHC 8.10.1 is already installed, and would fail (and not initiate any network connections!) if GHC 8.10.1 is not yet installed. Similarly, ghcup tui
, ghcup rm
, ghcup list
should all work based on locally available information. Even ghcup install
could work if the given GHC version is already downloaded into cache but not installed yet.