Skip to content

scripts/verify-pack: exits 0 when no pack directory is given #136

Open

Description

@royosherove

scripts/verify-pack L401-405:

if [[ ${#TARGETS[@]} -eq 0 ]]; then
  echo "Error: No pack directory specified."
  echo ""
  usage
fi

usage() ends with exit 0 (L48).

Problem: bash scripts/verify-pack with no argument prints an error but returns exit code 0. A script that calls verify-pack "$PACK" with an empty $PACK thinks that the check passed. The error also goes to stdout, not stderr.

Fix: At line 404, use usage >&2; exit 1 (or give usage() an exit-code argument).


Found by a code read at commit 1e50295. The code was read, but not run on a real instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcrew: in progressIssue Radar work claimed by a Kiro Crew workergood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions