Open Grafcube opened 4 months ago
This approach of simply removing the quotes solved #45 because $transient
would never contain any spaces, but the same can't be guaranteed for $icon_arg
; some users really do put spaces in their filenames.
Thankfully, it looks like we can replace "$icon_arg"
with ${icon_arg:+"$icon_arg"}
, which will expand to the quoted value if it exists (accounting for spaces) and nothing (not even the empty string) otherwise. Doing that would cause the following test to fail, but only because it now contains an extraneous space at the end.
I've changed it to use ${icon_arg:+"$icon_arg"}
. It didn't even occur to me that icon names could contain spaces.
It didn't even occur to me that icon names could contain spaces.
As I understand it, icon names are essentially just basename
s of filesystem paths, which shouldn't but certainly can contain spaces. I've no doubt someone somewhen would've been bitten by the unquoted form, so thanks for updating.
Thanks for the fix. I'm not around a laptop to test this, but I should be able to give it a look sometime today. The failing tests need to be looked at as they could indicate a problem
If
AUTO_NOTIFY_ICON_SUCCESS
orAUTO_NOTIFY_ICON_FAILURE
is not set, the command fails withInvalid number of options
since$icon
is empty.