-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[ci] fix some shellcheck errors in scripts #6504
[ci] fix some shellcheck errors in scripts #6504
Conversation
…icrosoft#6498) - Errors- SC2086 (info) : Double quote to prevent globbing and word splitting
…t#6498) - Fixed SC2086 (info): Double quote to prevent globbing and word splitting.
…icrosoft#6498) - fixed SC2086 (info): Double quote to prevent globbing and word splitting.
@microsoft-github-policy-service agree |
hi @jameslamb |
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.
Thanks for taking the time to contribute to LightGBM!
I've requested some changes here. I've also made some edits:
- removed
fixed #6498
from the PR title... this does not FIX that issue, it just helps make some progress towards it - added a link to [ci] enforce 'shellcheck' checks #6498 in the PR description... please always do this when you contribute here and your contribution relates to other discussions in the project
- Used double quotes around entire word as suggested - microsoft#6498
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.
thanks for your help, please see my recent suggestions
"llvm-${CLANG_VERSION}"-dev \ | ||
"llvm-${CLANG_VERSION}"-tools \ | ||
"libomp-${CLANG_VERSION}"-dev \ | ||
"libc++-${CLANG_VERSION}"-dev \ | ||
"libc++abi-${CLANG_VERSION}"-dev \ | ||
"libclang-common-${CLANG_VERSION}"-dev \ | ||
"libclang-${CLANG_VERSION}"-dev \ | ||
"libclang-cpp${CLANG_VERSION}"-dev \ | ||
"libunwind-${CLANG_VERSION}"-dev |
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.
"llvm-${CLANG_VERSION}"-dev \ | |
"llvm-${CLANG_VERSION}"-tools \ | |
"libomp-${CLANG_VERSION}"-dev \ | |
"libc++-${CLANG_VERSION}"-dev \ | |
"libc++abi-${CLANG_VERSION}"-dev \ | |
"libclang-common-${CLANG_VERSION}"-dev \ | |
"libclang-${CLANG_VERSION}"-dev \ | |
"libclang-cpp${CLANG_VERSION}"-dev \ | |
"libunwind-${CLANG_VERSION}"-dev | |
"llvm-${CLANG_VERSION}-dev" \ | |
"llvm-${CLANG_VERSION}-tools" \ | |
"libomp-${CLANG_VERSION}-dev" \ | |
"libc++-${CLANG_VERSION}-dev" \ | |
"libc++abi-${CLANG_VERSION}-dev" \ | |
"libclang-common-${CLANG_VERSION}-dev" \ | |
"libclang-${CLANG_VERSION}-dev" \ | |
"libclang-cpp${CLANG_VERSION}-dev" \ | |
"libunwind-${CLANG_VERSION}-dev" |
Please don't leave quotes in the middle of these words, as I asked in #6504 (comment).
|
||
# overwriting the stuff in /usr/bin is simpler and more reliable than | ||
# updating PATH, LD_LIBRARY_PATH, etc. | ||
cp --remove-destination /usr/lib/llvm-${CLANG_VERSION}/bin/* /usr/bin/ | ||
cp --remove-destination /usr/lib/llvm-"${CLANG_VERSION}"/bin/* /usr/bin/ |
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.
cp --remove-destination /usr/lib/llvm-"${CLANG_VERSION}"/bin/* /usr/bin/ | |
cp --remove-destination "$(echo /usr/lib/llvm-${CLANG_VERSION}/bin/*)" /usr/bin/ |
--arg pr_branch "$(echo $pr | jq '.head.ref')" \ | ||
--arg pr_number "$(echo "$pr" | jq '.number')" \ | ||
--arg pr_sha "$(echo "$pr" | jq '.head.sha')" \ | ||
--arg pr_branch "$(echo "$pr" | jq '.head.ref')" \ |
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.
Putting double quotes inside other double quotes like this requires escaping. To avoid that, please revert these changes and instead add the following comment on line 37 (directly above data=$(
):
# shellcheck disable=SC0286
@shreyash2002 are you planning to return to this pull request? Do you need any help? |
@shreyash2002 Thanks for your work here! Please pick up any other issue to contribute if you wish. |
Contributes to #6498