Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemctl: suppress errors with "show" for nonexistent units and prop…
…erties Show is documented to be program-parseable, and printing the warning about about a non-existent unit, while useful for humans, broke a lot of scripts. Restore previous behaviour of returning success and printing empty or useless stuff for units which do not exist, and printing empty values for properties which do not exists. With SYSTEMD_LOG_LEVEL=debug, hints are printed, but the return value is still 0. This undoes parts of e33a06a and 3dced37 and fixes #3856. We might consider adding an explicit switch to fail on missing units/properties (e.g. --ensure-exists or similar), and make -P foobar equivalent to --ensure-exists --property=foobar. Cherry-picked from: bd5b9f0 Resolves: #1380259
- Loading branch information