Fix: Warning in installation shell script - #1771
Merged
Merged
Conversation
DennisYu07
requested review from
LaZzyMan,
Mingholy,
gwinthis,
pomelo-nwu and
tanzhenxin
as code owners
February 9, 2026 08:25
Contributor
📋 Review SummaryThis PR addresses warnings in the installation shell script by implementing several important improvements: enabling pipefail to catch errors in pipelines, consistently using proper variable quoting with ${VAR} syntax, and updating conditional statements to use [[ ]] instead of [ ]. These changes enhance the script's reliability and robustness. 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Collaborator
Author
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
xaelistic
pushed a commit
to xaelistic/qwen-code
that referenced
this pull request
Jun 7, 2026
…lation-shell Fix: Warning in installation shell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fix ShellCheck warnings and potential issues in the installation script to improve robustness and security. Key changes:
- Add
set -o pipefailto catch pipeline errors- Standardize variable references to ${VAR} format to prevent word splitting
- Upgrade conditional statements from [ ] to [[ ]]
- Enhance error handling with fault tolerance mechanisms
Dive Deeper
Problem Background
The installation script install-qwen-with-source.sh had multiple ShellCheck warnings:
- Pipeline command failures were undetectable (missing pipefail)
- Unquoted variables could cause word splitting/pathname expansion
- Used POSIX [ ] instead of safer Bash [[ ]]
- Dynamic source files lacked shellcheck directives
Scope
- Only modifies the installation script, no core functionality changes
- All changes are backward compatible and transparent to users
- Improves script compatibility across different shell environments
Reviewer Test Plan
Testing Matrix
Linked issues / bugs