Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't call Gem::Version.new() with a nil version #247

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def configure_cloud_init
return unless content = customization_template_content
with_provider_destination { |d| d.update_cloud_init!(content) }

if Gem::Version.new(source.ext_management_system.api_version) >= Gem::Version.new("3.5.5.0")
if source.ext_management_system.api_version && Gem::Version.new(source.ext_management_system.api_version) >= Gem::Version.new("3.5.5.0")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth assigning source.ext_management_system.api_version to a variable for readability, up to you though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good point I'll push a followup to address this

phase_context[:boot_with_cloud_init] = true
end
end
Expand Down