Skip to content

--script parameter ignored on macOS #108

@p-kaczynski

Description

@p-kaczynski

On macOS High Sierra v.10.13.6, when build.sh processes --script="<path>" using the following snippet:

# Parse arguments.
for i in "$@"; do
    case $1 in
        -s|--script) SCRIPT="$2"; shift ;;
        --) shift; CAKE_ARGUMENTS+=("$@"); break ;;
        *) CAKE_ARGUMENTS+=("$1") ;;
    esac
    shift
done

the line -s|--script) SCRIPT="$2"; shift ;; will NOT execute, because the use of = sign between --script and the path gets treated as a singular parameter, not equal to either -s or --script. Therefore the SCRIPT var is not overriden and if the script file is not in default location and/or named as in defaults the execution will fail.

Note, that this might work correctly on other systems, but due to time restrictions I did not test that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions