You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is important, because some plugins can be configured by environment variables. If the environment variables don't exist until after the plugin is applied, then the plugins can't be configured with withEnv.
plugin2 {
// I do a thing that expected MY_VAR to be set - it is not yet set
plugin1 {
// I do a thing that expected MY_VAR to be set - it is not yet set
withEnv(MY_VAR=value) {
// Only now is MY_VAR set, but it's too late now
terraform command
}
}
}
A better, and less surprising implementation, would be to apply withEnv decorations in the same order in which they are called, relative to plugins. Eg:
In pseudocode, it roughly plays out like this:
which roughly leads to:
This outcome doesn't change regardless of how you order your code:
This is important, because some plugins can be configured by environment variables. If the environment variables don't exist until after the plugin is applied, then the plugins can't be configured with
withEnv
.A better, and less surprising implementation, would be to apply withEnv decorations in the same order in which they are called, relative to plugins. Eg:
Should result in
=====
Should result in
=====
Should result in
The text was updated successfully, but these errors were encountered: