-
Notifications
You must be signed in to change notification settings - Fork 206
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 environment flag not respected #1534
Conversation
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference (preview)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix!
This changes the resolution of environment flag to bypass IoC registration and use the hardcoded
environmentName
flag. A test has been added to verify that-e
is respected in the CLI. This test failed prior to these changes.Explanation: With the switch to
golobby
, there isn't an ability to specify bindings between concrete and interfaces except through the resolver function's return type. A concrete flag instance is being registered, and thus in the existing code, only the concrete type is resolved, andflags
is never resolved. Switching to named registration is also not an option, since: we need a single unique name, and actions end up sharing the same container. Thus, the second time aflagResolver
is registered, it will fail.