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

azd env set add warning #4547

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

azd env set add warning #4547

wants to merge 6 commits into from

Conversation

NanaXiong00
Copy link

@NanaXiong00 NanaXiong00 commented Nov 13, 2024

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:
image

@rajeshkamal5050 for notification.

Copy link
Contributor

@wbreza wbreza left a 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.

Comment on lines 165 to 170
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
}
Copy link
Contributor

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.

Copy link
Author

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",
Copy link
Contributor

@weikanglim weikanglim Nov 14, 2024

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.

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.

3 participants