ignore for core
Ignore selected output streams from the previous command in the pipeline.
Signature
> ignore {flags}
Flags
--stderr, -e: Consume all stderr output and allow stdout output through.--stdout, -o: Consume all stdout output and allow stderr output through.--show-errors, -x: Allow errors through and set $env.LAST_EXIT_CODE (internal failures use 1).
Input/output types:
| input | output |
|---|---|
| any | any |
Examples
Ignore all stdout output (default behavior).
> echo done | ignoreConsume stderr and allow stdout through.
> echo done | ignore --stderr
doneConsume stdout while keeping stderr visible.
> $'done' | ignore --stdoutShow internal errors and read the resulting exit code.
> try { error make {msg: 'boom'} | ignore --show-errors } catch { $env.LAST_EXIT_CODE }
1