You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
Does this issue reproduce with the latest release?
Yes, tested v0.2.2 and v0.3.0-alpha1.0.20200730155834-304b02e40842, different error message though.
What did you do?
cat >prompter_tool.cue <<EOF
package foo
import (
"tool/cli"
"tool/exec"
"tool/file"
)
city: "Amsterdam"
// Say hello!
command: prompter: {
// save transcript to this file
var: file: *"out.txt" | string @tag(file)
ask: cli.Ask & {
prompt: "What is your name?"
response: string
}
// starts after ask
echo: exec.Run & {
cmd: ["echo", "Hello", ask.response + "!"]
stdout: string // capture stdout
}
// starts after echo
file.Append & {
filename: var.file
contents: echo.stdout
}
// also starts after echo
print: cli.Print & {
text: echo.stdout
}
}
EOF
What did you expect to see?
Example from go help cmd working (1st one does, 2nd one doesn't).
A prompt and then a message on stdout.
What did you see instead?
v0.2.2 no prompt, and:
go/bin/cue cmd -v prompter
command.prompter.contents: invalid bytes argument for field "contents": non-concrete value string:
./prompter_tool.cue:12:10
v0.3.0-alpha1.0.20200730155834-304b02e40842 no prompt, and:
go/bin/cue cmd -v prompter
command.prompter.contents: invalid bytes argument for field "contents": incomplete cause disjunction:
./prompter_tool.cue:12:10
The text was updated successfully, but these errors were encountered:
This should be fixed with Ask now being supported. Obviously, there is another problem here in that it should have reported that as an error, and not the obscure errors it returned instead. So keeping this open for now.
mpvl
changed the title
cue cmd: 2nd example from documentation doesn't work
cue cmd: improve error message for non-existing commands
Sep 30, 2020
What version of CUE are you using (
cue version
)?(also reproduced on latest master version)
Does this issue reproduce with the latest release?
Yes, tested v0.2.2 and v0.3.0-alpha1.0.20200730155834-304b02e40842, different error message though.
What did you do?
What did you expect to see?
Example from
go help cmd
working (1st one does, 2nd one doesn't).A prompt and then a message on stdout.
What did you see instead?
v0.2.2 no prompt, and:
v0.3.0-alpha1.0.20200730155834-304b02e40842 no prompt, and:
The text was updated successfully, but these errors were encountered: