Using the CLI frontend, xfce4-panel --add="invalid plugin name" provides no output and returns 0
Submitted by j.l..@..il.com
Description
When trying to add a plugin to the panel via the command line / console / CLI frontend, if an invalid value (i.e., not an actual plugin name) is passed as an argument, there is no output and the command returns 0 (success).
Examples:
xfce4-panel --add=nonexistant
xfce4-panel --add=foo
xfce4-panel --add="not real"
xfce4-panel --add=""
xfce4-panel --add=
What happens: no output, no visible changes in the panel, echo $? returns 0 (success)
What was expected: error message in output specifying that such plugin name was not found, no visible changes in the panel, echo $? returning non-zero (failure)
Without an error message to diagnose, it is unclear what the expected plugin name should be (foo vs. foo-plugin vs. xfce4-foo-plugin).
This was tested in latest Xubuntu 16.04.4 amd64, with xfce4-panel --version reporting "xfce4-panel 4.12.0 (Xfce 4.12)", but I am assuming it went unreported and thus unfixed until now.
There is too much GLib obfuscation for me to find the actual source of the defect, but here are a few potentially relevant locations (the following code snapshots were all taken at commit https://github.com/xfce-mirror/xfce4-panel/commit/ca42838b6f396c5ffa01a37bb891341f517125e2):
- https://github.com/xfce-mirror/xfce4-panel/blob/master/panel/main.c - lines 308 to 313
- https://github.com/xfce-mirror/xfce4-panel/blob/master/panel/panel-dbus-client.c - lines 139 to 169
- https://github.com/xfce-mirror/xfce4-panel/blob/master/panel/panel-dbus-service.c - lines 255 to 282
Version: 4.12.0