-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Line 57 in a1dc7bd
| # shellcheck disable=SC2059 |
Line 64 in a1dc7bd
| # shellcheck disable=SC2059 |
Line 71 in a1dc7bd
| # shellcheck disable=SC2059 |
Line 78 in a1dc7bd
| # shellcheck disable=SC2059 |
These are valid semantic errors that can lead to printf doing the wrong thing when the variables used contain format strings. As it stands though, this behavior is expected for one of the variables used here.
I'd probably nest the printfs - one for the mesg formatting, and one for the rest.
Just in case some future terminal with more in-band signaling ends up using % in their escape sequences ;)
Alternatively, consider something like "%s ... ${mesg}" "${BOLD}" ... and whatnot, where everything but mesg is separated into printf formatting
Lines 115 to 118 in a1dc7bd
| # shellcheck disable=SC2140 | |
| mount -t overlay overlay \ | |
| -o lowerdir="$BUILDDIRECTORY/root",upperdir="$BUILDDIRECTORY/${build}_upperdir",workdir="$BUILDDIRECTORY/${build}_workdir" \ | |
| "$BUILDDIRECTORY/${build}" |
This is also a valid issue. As it currently stands it looks like you may have intended for the quotes to end up in the args as literals, but right now they're all interpreted by your shell. The entire arg should be wrapped in quotes.
Lines 259 to 260 in a1dc7bd
| # shellcheck disable=SC2086 | |
| exec_nspawn build --bind="$(readlink -e ${cachedir}):/cache" pacman -U ${packages[*]} --noconfirm |
Should be "${packages[@]}" instead of ${packages[*]}. What it's currently doing is basically "join all the arguments by the first character of IFS (space), split them by IFS and expand each of them as globs, and use those as args for the commandline you're building"
Lines 319 to 328 in a1dc7bd
| xdg_repro_dir="${xdg_config_home:-$home/.config}/repro" | |
| if [[ "$repro_conf" = "$configdir/repro.conf" ]]; then | |
| if [[ -r "$xdg_repro_dir/repro.conf" ]]; then | |
| # shellcheck source=/dev/null | |
| source "$xdg_repro_dir/repro.conf" | |
| elif [[ -r "$home/.repro.conf" ]]; then | |
| # shellcheck source=/dev/null | |
| source "$home/.repro.conf" | |
| fi | |
| fi |
$home is not a thing, you probably wanted $HOME