-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Core] Provide recommendation for JSON parsing error #17445
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
Conversation
| # dependencies for specific OSes | ||
| if not sys.platform.startswith('cygwin'): | ||
| DEPENDENCIES.append('psutil~=5.7') | ||
| DEPENDENCIES.append('psutil~=5.8') |
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.
Use psutil 5.8 in order to get Python 3.9 support.
| except SyntaxError: | ||
| raise CLIError(json_ex) | ||
| except ValueError as ex: | ||
| except Exception as ex: |
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.
No need to distinguish between SyntaxError and ValueError.
|
Core |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
yonzhan
left a comment
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.
LGTM
Description
We are seeing countless users complaining they have stumbled on Quoting issues with PowerShell.
All issues received: https://github.com/Azure/azure-cli/issues?q=is%3Aissue+label%3A%22Shell+-+PowerShell%22
Changes
This PR refines the error message of JSON parsing error:
InvalidArgumentValueErrorto replaceCLIErrorTesting Guide
Before:
After: