8000 ✨ Add shell command for exit with exit code · Issue #10538 · dagger/dagger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
✨ Add shell command for exit with exit code #10538
Closed
@skycaptain

Description

@skycaptain

What are you trying to do?

The cookbook provides a helpful example of how to continue using a container after a command execution fails. A common pattern is running tests and returning results, or executing a long-running build and uploading cache artifacts—even if the build fails. I would like to use this pattern in dagger-shell as well; however, there seems to be no way to exit a dagger-shell script with an exit code. I.e. something like this

m=$(mymodule | build)
exit_code=$(m | exit-code)

m | results | export "./build"

.exit $exit_code

See also #10430.

Why is this important to you?

No response

How are you currently working around this?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0