Skip to content

fix install script without tailscale - #60

Open
juliendsv wants to merge 1 commit into
madrzak:mainfrom
juliendsv:main
Open

fix install script without tailscale#60
juliendsv wants to merge 1 commit into
madrzak:mainfrom
juliendsv:main

Conversation

@juliendsv

Copy link
Copy Markdown

Running bash install.sh --no-tailscale (or any invocation that results in an empty SETUP_ARGS array) fails with:

  install.sh: line 121: SETUP_ARGS[@]: unbound variable

This is caused by set -u treating an empty array's [@] expansion as unbound — a known bash quirk.

Fix

Use the ${var+word} conditional expansion pattern on line 121, which
only expands the array when it has elements and produces nothing when it
is empty:

  ./setup.sh "${SETUP_ARGS[@]+"${SETUP_ARGS[@]}"}"

This is the same pattern already used on line 100 for the filtered
array.

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.

1 participant