fix: skip install when qwen CLI already exists - #14
Conversation
Add if-missing guard matching qwen-code-pr-review.yml pattern: skip npm install entirely when qwen is already in PATH. Version updates are managed by the fleet updater, not per-run installs. Also replace --silent with --loglevel=error so fresh-install failures are diagnosable from the Actions log. Fixes intermittent exit 243 across ECS runners caused by non-root users lacking write permission to the global npm prefix.
|
Hi @yiliang114, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
🟡 Not ready to approve
The new “already installed” branch can fail the step due to set -e on qwen --version and currently skips honoring qwen_cli_version without warning.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR updates the composite action’s “Install Qwen Code” step to avoid global installs on runners that already have qwen available, and to make fresh-install failures more diagnosable in GitHub Actions logs.
Changes:
- Skip
npm/pnpm --globalinstallation whenqwenis already present inPATH. - Replace
--silentinstalls with--loglevel=errorto surface actionable failure output. - Restructure install/verification flow so verification happens after the conditional install path.
File summaries
| File | Description |
|---|---|
| action.yml | Adds a presence guard around Qwen CLI installation and adjusts npm/pnpm logging for debuggability. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| if command -v qwen >/dev/null 2>&1; then | ||
| qwen --version || echo "Qwen Code installed successfully (version command not available)" | ||
| echo "Qwen Code already installed, skipping install:" | ||
| qwen --version | ||
| else |
Summary
npm install --globalentirely whenqwenis already in PATH, matching the pattern inqwen-code-pr-review.yml. Version updates are managed by the fleet updater, not per-run installs.--silentwith--loglevel=errorso that when a fresh install is needed (new runner), failures are diagnosable from the Actions log.Fixes intermittent exit 243 failures across the ECS runner fleet caused by non-root runners lacking write permission to the global npm prefix.
Test plan