-
Notifications
You must be signed in to change notification settings - Fork 202
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
azd env set
add warning
#4547
base: main
Are you sure you want to change the base?
azd env set
add warning
#4547
Conversation
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.
Looks good - but please update warning style to be consistent with UX guidelines before merging.
cli/azd/cmd/env.go
Outdated
if strings.ToLower(existingKey) == lowerKey { | ||
fmt.Printf( | ||
"WARN: The environment variable '%v' already exists in the .env file with a different case.\n", | ||
existingKey) | ||
return | ||
} |
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.
Please ensure warning messages are consistent with other warnings in the system. Messages should read "WARNING: [Message]" in Yellow by using our output.WithWarningFormat(...)
helper function.
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.
@wbreza I have updated based on suggestions, please re-review.
conflictKeysStr := strings.Join(conflictKeys, " and ") | ||
fmt.Print( | ||
output.WithWarningFormat( | ||
"WARNING: The environment variable %s already exists in the .env file with a different case.\n", |
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.
Let's hold off on merging, I'd like to continue with the requirements discussion here before we finalize the changes.
Fixes issue #289.
azd env set
adds warning about case sensitivity: warn if the same value is present but in mixed case.As shown in the figure below:
@rajeshkamal5050 for notification.