sonatype-lift[bot] commented on code in PR #8881:
URL: https://github.com/apache/skywalking/pull/8881#discussion_r852574372
##########
test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh:
##########
@@ -22,9 +22,18 @@
BASE_DIR=$1
BIN_DIR=$2
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
curl -kLo skywalking-cli.tar.gz
https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
tar -zxf skywalking-cli.tar.gz --strip=1
- make install DESTDIR=$BIN_DIR
+ VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+ echo "swctl is not installed"
+ install_swctl
+elif ! echo "$(swctl --version)" | grep -q "${SW_CTL_COMMIT}"; then
Review Comment:
*ShellCheck:* Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
---
Was this a good recommendation?
[ [🙁 Not
relevant](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=1)
] - [ [😕 Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=2)
] - [ [😑 Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=3)
] - [ [🙂 Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=4)
] - [ [😊 Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=193491549&lift_comment_rating=5)
]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]