Skip to content

CI runs the installer with -- before its flags, so the annex and loader steps test the default profile #211

Description

@ss-o

Summary

.github/workflows/check-linux.yml and .github/workflows/check-macos.yml run the real installer three times with the flags placed after --:

run: sh -x ./public/sh/install.sh -- -i skip; ...
run: sh -x ./public/sh/install.sh -- -a annex; ...
run: sh -x ./public/sh/install.sh -- -a loader; ...

POSIX getopts stops option parsing at --, and install.sh then does shift $((OPTIND - 1)), so -i skip, -a annex, and -a loader become operands and ZOPT, AOPT stay empty. All three steps have therefore always run the default profile; the annex and loader paths have never been exercised by these steps, on either runner.

Evidence

sh -c 'AOPT=""; while getopts ":i:a:b:" o; do case $o in a) AOPT=$OPTARG;; esac; done; shift $((OPTIND-1)); echo "AOPT=[$AOPT] rest=[$*]"' _ -- -a annex
AOPT=[] rest=[-a annex]

Found while working on #210, whose harness cases are currently the only coverage of those profiles.

Expected

Remove -- from the six run: lines (three per workflow) so each step runs the profile its name claims, and confirm in the job logs (sh -x) that AOPT is set. Since the loader and annex steps then run for real for the first time, review their first green run rather than assuming it.

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions