-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: improve error message when modules experiment not enabled
When `cue mod tidy` or `cue mod publish` are run, which both require modules to be enabled, the current error seems to indicate that there is no registry configured, even though there's a default registry fallback, so that shouldn't be necessary. Change the error message to suggest setting CUE_EXPERIMENT=modules instead. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I57348e595154ab99a0a6ada09fa80584a62958dc Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1177130 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information
Showing
4 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
cmd/cue/cmd/testdata/script/modpublish_registry_not_enabled.txtar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
! exec cue mod publish v1.0.0 | ||
cmp stderr want-stderr | ||
-- want-stderr -- | ||
modules experiment not enabled (enable with CUE_EXPERIMENT=modules) |
4 changes: 4 additions & 0 deletions
4
cmd/cue/cmd/testdata/script/modtidy_registry_not_enabled.txtar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
! exec cue mod tidy | ||
cmp stderr want-stderr | ||
-- want-stderr -- | ||
modules experiment not enabled (enable with CUE_EXPERIMENT=modules) |