-
Notifications
You must be signed in to change notification settings - Fork 805
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
[BugBash] SC2001: Remove sed as it's not required #3248
Conversation
Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
…o ap_bb_SC2001
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
install.sh
Outdated
@@ -581,7 +581,7 @@ install_kind() { | |||
err_msg=$(kind version 2>&1 1>/dev/null) | |||
if [ "$err_msg" == "" ]; then | |||
v=$(kind version | awk '{print $2}' | sed s/v//g) | |||
target_version=$(echo "${kind_version}" | sed s/v//g) | |||
target_version=$(echo "${kind_version//v/g}") |
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.
SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
(at-me in a reply with help
or ignore
)
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
…o ap_bb_SC2001
Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
Markdown check are failing as
|
Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
install.sh
Outdated
@@ -318,7 +318,7 @@ install_kubectl() { | |||
err_msg=$(kubectl version --client=true 2>&1 1>/dev/null) | |||
if [ "$err_msg" == "" ]; then | |||
v=$(kubectl version --client=true | sed 's/.*GitVersion:\"v\([0-9.]*\).*/\1/g') | |||
target_version=$(echo "${kubectl_version}" | sed s/v//g) | |||
target_version=${kind_version//v/g} |
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.
#!/usr/bin/env bash
kubectl_version="v0.11.1"
target_version=$(echo "${kubectl_version}" | sed s/v//g)
echo ${target_version}
target_version=${kubectl_version//v/g}
echo ${target_version}
I have write a test script , but it return:
0.11.1
g0.11.1
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.
#!/usr/bin/env bash
kubectl_version="v0.11.1"
target_version=$(echo "${kubectl_version}" | sed s/v//g)
echo ${target_version}
target_version=${kubectl_version//v}
echo ${target_version}
Returns ->
0.11.1
0.11.1
Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com>
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.
LGTM!
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.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 2bf6514
|
@anuragpaliwal80: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
* SC2001: Remove sed as it's not required Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com> * Fix lift error Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com> * Update CHANGELOG.md Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com> * One more fix Signed-off-by: Anurag Paliwal <anuragpaliwal@gmail.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Co-authored-by: Cwen Yin <cwenyin0@gmail.com> Signed-off-by: STRRL <im@strrl.dev>
What problem does this PR solve?
What's changed and how it works?
Remove sed as it's not required
Related changes
chaos-mesh/website
Dashboard UI
Checklist
CHANGELOG
CHANGELOG.md
Tests
Side effects
Release note
DCO
If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it: