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

fix expansion for the case of ENV var is not set #299

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

pvshewale
Copy link
Contributor

This is a 🐞 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

As per docs, with Terraspace v2, any environment variable is also available in the expansion helper. IE: MY_VAR=foo can be use in the expansion(":MY_VAR") method.
This works as expected if MY_VAR is set to some value, but in case environment variable MY_VAR is not set it's returning as it is in non-expanded state like ":MY_VAR"
Now with this fix, it returns empty space if environment variable is not set. Unit test case is also updated.

Context

How to Test

Just run the unit test

rspec spec/terraspace/provider/expander/generic_spec.rb

Version Changes

@tongueroo tongueroo merged commit bd4ac66 into boltops-tools:master Apr 19, 2023
@tongueroo
Copy link
Contributor

Thanks 👍 Released in 2.2.4

@pvshewale
Copy link
Contributor Author

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants