Skip to content

Allow other programs to detect that `upgrade` is disabled

!234 (merged) provided a way for the upgrade command to be disabled in the brew distribution of ghcup. However, this particular implementation (removing the command entirely) leads to issues such as https://github.com/haskell/vscode-haskell/issues/601 where other programs that want to use it will just receive a generic failure and have no way to detect that the specific command is unavailable. (See https://github.com/haskell/vscode-haskell/pull/602 for context.)

It would be good if there was some way for other tools/scripts/etc to check whether the command is available or not so that they can deal with this more gracefully. Some ideas:

  • The --version command could report that it is a brew build
  • The upgrade command could be re-enabled for brew, but not perform any work and instead report that it is disabled (via a specific exit code or some meaningful output)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information