Open
Description
If config.SoftFail
is called after an exec
has finished (e.g. due to the OTel collector returning a non-compliant header), otel-cli will return 0 (or 1, if --fail
/OTEL_CLI_FAIL=true
), masking any failures in the underlying operation.
Instead, it should probably do something like:
# exitCode could be a parameter, or come from a helper that fetches it?
if c.Fail {
os.Exit(exitCode | 1) // or just `1`?
} else {
os.Exit(exitCode)
}
Otherwise, otel-cli should probably make clear that its surfacing of the operation's return code is incidental, maybe provide some alternative method of surfacing it (export an OTEL_CLI_LAST_RC
?).
Metadata
Metadata
Assignees
Labels
No labels