Skip to content

Error on non-zero exit statuses for pipeline elements #13817

@Hofer-Julian

Description

@Hofer-Julian

Related problem

Since #13515 non-zero exit status of a command on a trailing pipeline position errors. The same isn't true for pipeline elements.

So a) will error, while b) will not.
Assuming that b) doesn't collect its input.

# a)
foo | may-fail
# b)
foo | may-fail | bar

Describe the solution you'd like

According to @IanManske, changing that isn't possible with the current code structure

I still wanted to open an issue, since this might change at some point. If it does, I would appreciate it if nushell would error for both scenarios a) and b)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:error-handlingHow errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)category:enhancementNew feature or requeststatus:needs-designthis feature requires design

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions