Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
1
-
Language 2016-02-10
-
Not Needed
-
Not needed part of NC feature / speed improvements.
Description
If I pass a path to a manifest file that does not exist to the list of files to be parsed in a call to Puppet::InfoService::ClassInformationService.new.classes_per_environment, the return value just returns an empty array, as opposed to a hash with an :error key/value pair in it.
For example, running the following code...
require 'puppet' |
require 'puppet/info_service' |
|
files_to_parse = { "production" => [ "./parse.pp" ] } |
|
puts Puppet::InfoService::ClassInformationService.new.classes_per_environment(files_to_parse) |
... where "./parse.pp" does not exist produces the following output:
{"production"=>{"./parse.pp"=>[]}}
|
If instead I have a file that exists at "./parse.pp" which has bad content in it...
bogus manifest
|
... an :error is returned in a hash associated with the file name:
{"production"=>{"./parse.pp"=>{:error=>"This Name has no effect. A value was produced and then forgotten (one or more preceding expressions may have the wrong form) at ./parse.pp:1:1"}}}
|
It seems like both cases should result in an :error key being returned.
Attachments
Issue Links
- links to