Skip to content

Commit 602b420

Browse files
Merge pull request #331 from lablabs/fix/check_rke2_version_script
fix: random SIGPIPE (141) on `Check RKE2 version` task
2 parents 54a952c + ebf2e19 commit 602b420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tasks/rke2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
rke2_version="{{ rke2_version }}"
197197
198198
if [ -f "$rke2_bin_path" ]; then
199-
installed_version="$($rke2_bin_path --version | awk '/version/ {print $3; exit}')"
199+
installed_version="$($rke2_bin_path --version | awk '/rke2 version/ {print $3}')"
200200
else
201201
installed_version="not installed"
202202
fi
@@ -207,7 +207,7 @@
207207
208208
# Linux appends the target of removed proc exe with ' (deleted)', making the path unavailable.
209209
if [ -f "$rke2_bin_path" ]; then
210-
running_version="$($rke2_bin_path --version | awk '/version/ {print $3; exit}')"
210+
running_version="$($rke2_bin_path --version | awk '/rke2 version/ {print $3}')"
211211
elif [ "$installed_version" = "not installed" ]; then
212212
running_version="$rke2_version"
213213
else

0 commit comments

Comments
 (0)