-
Notifications
You must be signed in to change notification settings - Fork 327
Closed
Description
What version of CUE are you using (cue version
)?
$ cue version cue version 0.10.0
Does this issue reproduce with the latest stable release?
yes
What did you do?
I've written simple pre-commit hook, which uses cue from go script. Here is main file of the repo:
https://github.com/jakub-borusewicz/cue-auto-export/blob/master/main.go
I'm running Command.Execute()
in loop, which raises error here:
https://github.com/cue-lang/cue/blob/master/cmd/cue/cmd/root.go#L96
What did you expect to see?
I would expect being able to run cue command directly from go multiple times, or maybe some way of easily running in-code analog of it without this restriction (I didn't find anything similar).
In my case there is no way around it, since pre-commit runs hooks in such a way that it will accept multiple input files at one time.
What did you see instead?
panic: cmd/cue/cmd.mkRunE init ran twice