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

Cannot add multiple prerelease channels? #922

Closed
phadej opened this issue Nov 10, 2023 · 2 comments
Closed

Cannot add multiple prerelease channels? #922

phadej opened this issue Nov 10, 2023 · 2 comments

Comments

@phadej
Copy link

phadej commented Nov 10, 2023

It looks like

% ~/.ghcup/bin/ghcup config add-prerelease-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-cross-0.0.8.yaml

does nothing if I already have (another) prerelease channel. My config looks like

...
url-source:
- GHCupURL
- https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml
verbose: false

before and after the command.

That is very unconvenient, if one cannot add multiple prerelease channels, nor there are command to remove any.


Maybe add-prerelease-channel doesn't work at all?

@phadej
Copy link
Author

phadej commented Nov 10, 2023

It's add-release-channel. ghcup just silently does nothing on a wrong command. That is a bug.

hasufell added a commit that referenced this issue Nov 12, 2023
@hasufell
Copy link
Member

Not really a bug, just confusing behavior.

What happens here that ghcup config <key> <value> is a shorthand for ghcup config set <key> <value>. Additionally, ghcup is a bit too lax when the key (add-prerelease-channel here) doesn't exist... decoding does not fail.

I fixed both here: #926

  • ghcup config <key> <value> is no longer valid
  • ghcup config set <non-existent-key> <value> will now properly error instead of doing nothing

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

2 participants