cue-lang / cue

The home of the CUE language! Validate and define text-based and dynamic configuration
https://cuelang.org
Apache License 2.0
5.01k stars 283 forks source link

cmd/cue: `cue mod init` should not create module.cue file with empty module path #3260

Closed rogpeppe closed 1 month ago

rogpeppe commented 2 months ago

What version of CUE are you using (cue version)?

$ cue version
v0.9.2

Does this issue reproduce with the latest stable release?

Yes

What did you do?

! exec cue mod init

What did you expect to see?

A passing test. Modules cannot have an empty module path, so either cue mod init should fail, or it should choose an arbitrary path for the module (test.example ?).

What did you see instead?

> ! exec cue mod init
FAIL: /tmp/x.txtar:1: unexpected command success
jpluscplusm commented 1 month ago

or it should choose an arbitrary path for the module (test.example ?).

\ cue.example \