Skip to content

down.sh --no-prune cannot be passed bare #43

Description

@locriani

The case pattern globs on =*, so ./down.sh --no-prune falls through to the catch-all and exits 1.

The problem

        --purge)
            PURGE=true
            shift
        ;;
        --non-interactive=*)
            NON_INTERACTIVE_MODE="${i#*=}"
            shift
        ;;
        --no-prune=*)
            PRUNE=false
            shift
        ;;

        *)
        echo "Unexpected option: $1"
        exit 1

--purge two cases above is the bare-flag form; --no-prune is written in the value-taking form but discards the value. So the one spelling that reads naturally is rejected, and --no-prune=true parses and sets PRUNE=false.

Why it matters

Skipping the prune is only reachable by passing an = and a value that is then ignored. The failure is loud (Unexpected option), so this costs a retry rather than silently pruning.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions