Skip to content

entry.sh:10 and entry.sh:16 write argument-validation errors to stdout instead of stderr #225

Description

@edmoffo

The argument-validation checks in entry.sh print their failure messages to stdout, not stderr.

At entry.sh:10:

echo "The first argument must be the ID of the job to process"
exit 1

and the same pattern repeats at entry.sh:16 for the missing-home check. Both branches exit 1 on the next line, but the diagnostic line is written to file descriptor 1.

A caller that runs entry.sh ... 2>/dev/null or pipes the script's stdout into another stage gets a silent failure: stderr stays empty, stdout carries a sentence the next stage interprets as data. The same script enables set -ex on entry.sh:5, which sends the shell trace to stderr by convention; mixing diagnostic output between the two streams forces every caller to special-case which fd carries which kind of message.

Fix: redirect both echo calls to stderr — echo "..." >&2 on entry.sh:10 and entry.sh:16.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions