Skip to content

Conversation

@fdintino
Copy link
Contributor

There is an ambiguity in how short and long cli flags are passed that causes the script to clean whenever a full-static build is attempted with long cli option --full-static.

The second clause of the conditional that checks for the cleanup flag

    if [[ "$1" == "--cleanup" || "$1" =~ 'c' ]]; then

is overly broad and evaluates as truthy if $1 is "--full-cleanup". This
can be easily fixed by appending an additional string check along the lines of || "$1" =~ 'c' && ! "$1" =~ '--'.

There is an ambiguity in how short and long cli flags are passed that
causes the script to clean whenever a full-static build is attempted
with long cli option `--full-static``.

The second clause of the conditional that checks for the cleanup flag

    if [[ "$1" == "--cleanup" || "$1" =~ 'c' ]]; then

is overly broad and evaluates as truthy if $1 is "--full-cleanup". This
can be easily fixed by appending an additional string check against the
string "==", e.g `! "$1" =~ '--'`.
@markus-perl markus-perl merged commit b705324 into markus-perl:master Dec 1, 2020
@markus-perl
Copy link
Owner

Thanks, merged :-)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants