Fix: config error message #649
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR
Improve configuration error message to include file locations. When configuration files have
errors, users need to know where to find these files to fix them. This change enhances the
error message to include the exact paths to the user and workspace configuration files.
Fixes #2
Dive Deeper
The issue reported in #2 was that when configuration files contain syntax errors, users
couldn't easily locate and fix them because the error message didn't specify where the
configuration files are stored. This led to frustration as users had to search for the file
locations or ask for help.
This change enhances the error handling in the CLI to provide clear guidance to users on where
to find their configuration files when errors occur. The enhanced error message now includes:
Reviewer Test Plan
To validate this change:
Example test:
1 # Create an invalid settings.json file
2 echo '{"invalid": json}' > ~/.qwen/settings.json
3 # Run the CLI and check the error message
4 npx gemini
The error message should now include clear instructions on where to find the configuration
files.
Testing Matrix
┌──────────┬────┬────┬────┐
│ │ 🍏 │ 🪟 │ 🐧 │
├──────────┼────┼────┼────┤
│ npm run │ ✅ │ ✅ │ ✅ │
│ npx │ ✅ │ ✅ │ ✅ │
│ Docker │ ✅ │ ✅ │ ✅ │
│ Podman │ ✅ │ - │ - │
│ Seatbelt │ ✅ │ - │ - │
└──────────┴────┴────┴────┘
Linked issues / bugs
Fixes #2