Fix no returning rabbitmq_version and add default version? #819
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.
Signed-off-by: Justin Gross [email protected]
Pull Request (PR) description
I'm installing RabbitMQ 3.8.1 using rabbitmq module params as such:
I attempt to add user:
A check is done to see what version rabbit is so to know which command line options to use when running the rabbitmq CLI (-q --no-table-headers, or just -q) to determine if the user already exists or not.
The self.rabbitmq_version function returns a version if @rabbitmq_version is declared.
When not declared however it apparently tries to declare it (not a ruby developer) but then afterwords never returns it so whomever has called it is receiving a NilClass? (at least the very first time? presumably, because it sets the @rabbitmq_server?)
The error produced is as such:
"Failed to apply catalog: undefined method `scan' for nil:NilClass" because rabbitmq_version never returns anything unless it is globally defined (@rabbitmq_version)
This error is referenced by this issue:
#817
This Pull Request (PR) fixes the following issues