You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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"
archlinux-repro/repro.in
Line 57 in a1dc7bd
archlinux-repro/repro.in
Line 64 in a1dc7bd
archlinux-repro/repro.in
Line 71 in a1dc7bd
archlinux-repro/repro.in
Line 78 in a1dc7bd
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 formattingarchlinux-repro/repro.in
Lines 115 to 118 in a1dc7bd
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.
archlinux-repro/repro.in
Lines 259 to 260 in a1dc7bd
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"archlinux-repro/repro.in
Lines 319 to 328 in a1dc7bd
$home
is not a thing, you probably wanted$HOME
The text was updated successfully, but these errors were encountered: