-
Notifications
You must be signed in to change notification settings - Fork 653
Open
Labels
effort: easyProbably a quick fix. Want to contribute? :-)Probably a quick fix. Want to contribute? :-)help wantedIf you're looking to contribute, this issue is a good place to start!If you're looking to contribute, this issue is a good place to start!
Description
Summary
If you create or delete your lockfile and run rush list --json, the following is output to stdout:
Lockfile was created or deleted. Assuming all projects are affected.
{
"projects": [
...
]
}
This breaks automation that attempts to pipe the result of rush list --json to a tool like jq since the first line is not JSON.
Repro steps
- Delete a lockfile
- Commit
- Re-add the lockfile
- Run
rush list --json --impacted-by git:$COMMIT_SHA_WHERE_LOCKFILE_DOES_NOT_EXIST
Expected result: Only JSON is output to stdout. Since the error is a useful one, perhaps it should be output to stderr to preserve the ability to pipe the JSON to jq?
Actual result: The message "Lockfile was created or deleted. Assuming all projects are affected." is printed to stdout before the JSON is printed.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
5.153.2 |
rushVersion from rush.json? |
5.153.2 |
useWorkspaces from rush.json? |
No |
| Operating system? | Linux |
| Would you consider contributing a PR? | Yes |
Node.js version (node -v)? |
22.18.0 |
Metadata
Metadata
Assignees
Labels
effort: easyProbably a quick fix. Want to contribute? :-)Probably a quick fix. Want to contribute? :-)help wantedIf you're looking to contribute, this issue is a good place to start!If you're looking to contribute, this issue is a good place to start!
Type
Projects
Status
Low priority