Skip to content

The argument parsing doesn't check if a value was actually provided #878

@leighmcculloch

Description

@leighmcculloch

The argument parsing doesn't check if a value was actually provided.

For example, if someone runs docker run stellar/quickstart --enable --local, the code will incorrectly set ENABLE to --local instead of catching the missing value.

We could add a check like:

if [[ -z "$1" || "$1" == --* ]]; then
  echo "Error: --enable requires a value" >&2
  exit 1
fi

The above is an example, but could be applied to other options that accept a parameter.

Originally posted by @Copilot in #877 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog (Not Ready)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions