(PUP-2306) Force return type of generate to String #2559
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When Puppet::Util::Execution.execute was changed to return a subtype of
String in order to retain return code information, some callers ended up
breaking. This is because they made the assertion that types were exactly the
String class, rather than a subtype of String. There is also the issue that
only the primitive data structures should probably be returned from puppet
functions in order to not leak complex objects into the puppet language and
have hard to track down issues arise.
This changes the generate() function to force it to return a String of the
command's output.