Skip to content

Unsafe array handling in pattern.sh (shellcheck SC2086) #524

@brianredbeard

Description

@brianredbeard

Description

Variables that contain multiple arguments (like PODMAN_ARGS) are stored as strings and expanded without quotes, triggering shellcheck SC2086 warnings and causing issues with arguments containing spaces.

Location

https://github.com/validatedpatterns/multicloud-gitops/blob/main/pattern.sh

PODMAN_ARGS="--passwd-entry ... --user ..."
podman run $PODMAN_ARGS ...  # Unquoted expansion

Expected Behavior

Use bash arrays for multi-value variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions