Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
remove_resource
Attempt to redefine entity
The previous implementation used to find the resource in the catalog was causing the following style of error on the Puppetserver. ``` Server Error: Evaluation Error: Error while evaluating a Function Call, Could not autoload puppet/type/file_line: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/file_line' ``` This only occurred the first time trying to compile the catalog. Subsequent runs against the same puppetserver would work fine. I don't fully understand what was causing the type to be reloaded, and this was only an issue if `generate types` had been used to create the `.resource_types/*.pp` metadata file for the type. Presumably puppet is upset when it tries to load the ruby definition of a type after it's already loaded the pcore version?? In this commit, we switch to the same mechanism used by the `defined` function.
- Loading branch information