programs: sane-sandboxed: move parseArgsExtra to outer scope; improve docs

This commit is contained in:
Colin 2024-02-12 10:28:14 +00:00
parent 1e05119adc
commit 96575acf3a

View File

@ -118,8 +118,8 @@ ensureTrailingSlash() {
## parse CLI args into the variables declared above
## args not intended for this helper are put into $parseArgsExtra
parseArgsExtra=()
parseArgs() {
parseArgsExtra=()
while [ "$#" -ne 0 ]; do
_arg="$1"
shift
@ -215,6 +215,8 @@ parseArgs() {
paths+=("$_path")
;;
(--sane-sandbox-profile)
# load the profile *immediately*, inline.
# this way, user arguments which come later on the CLI can override any profile config, v.s. if profile loading were defered.
tryLoadProfileByName "$1"
shift
;;