| If a file in the LaunchAgents or LaunchDaemons paths is encountered that's parseable by Puppet::Util::Plist.read_plist_from_file but not a valid launchd plist file, then Puppet will crash with an error. To reproduce:
# echo "aaa" >/Library/LaunchDaemons/invalid.txt |
# puppet resource service |
Error: Could not run: undefined method `has_key?' for "aaa":String
|
In launchd.rb line 141, the parsed plist (job) is checked with .has_key? to ensure a Label is present. If the parsed plist is not a Hash, though, this will fail. I expect the correct course of action is to add a job.is_a?(Hash) check first. |