-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/flow: check and return errors from task values
Currently if an identifier doesn't exist within a _tool.cue file, it's ignored and no error is thrown. This updates the logic in the flow controller to check and return errors from task values during initialization. Fixes #1581. Change-Id: Iaf1a6262b7f44b07525b9e56079b804047dada9d Signed-off-by: Nick Figgins <figginsn@gmail.com>
- Loading branch information
1 parent
ff8d497
commit 92dc8e2
Showing
3 changed files
with
42 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
! exec cue cmd tool | ||
stderr 'command.tool.bad: undefined field: DoesntExist' | ||
! exec cue cmd builtin | ||
stderr 'command.builtin.bad: undefined field: DoesntExist' | ||
! exec cue cmd package | ||
stderr 'command.package.bad: undefined field: DoesntExist' | ||
-- cue.mod/module.cue -- | ||
module: "mod.test/test" | ||
-- sub/sub.cue -- | ||
package sub | ||
-- task_tool.cue -- | ||
package home | ||
|
||
import ( | ||
"tool/os" | ||
"strconv" | ||
"mod.test/test/sub" | ||
) | ||
|
||
command: tool: { | ||
bad: os.DoesntExist & { | ||
input: "a" | ||
} | ||
} | ||
|
||
command: builtin: { | ||
bad: strconv.DoesntExist & { | ||
a: "b" | ||
} | ||
} | ||
|
||
command: package: { | ||
bad: sub.DoesntExist | ||
} |
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