Skip to content

Commit 1ad7f0a

Browse files
authored
Remove spaces around NUM_NODES (#251)
1 parent a6a65be commit 1ad7f0a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scripts/deploy-statefulset-test-pods.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ mkdir -p ./temp
1111
REPLICAS=2
1212
# adjust replicas for possible SNO clusters
1313
NUM_NODES=$(oc get nodes --no-headers | wc -l)
14+
NUM_NODES="${NUM_NODES#"${NUM_NODES%%[![:space:]]*}"}"
15+
NUM_NODES="${NUM_NODES%"${NUM_NODES##*[![:space:]]}"}"
1416
if [[ $NUM_NODES == 1 ]]; then
1517
REPLICAS=1
1618
fi

scripts/deploy-test-pods.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ mkdir -p ./temp
1111
REPLICAS=2
1212
# adjust replicas for possible SNO clusters
1313
NUM_NODES=$(oc get nodes --no-headers | wc -l)
14+
NUM_NODES="${NUM_NODES#"${NUM_NODES%%[![:space:]]*}"}"
15+
NUM_NODES="${NUM_NODES%"${NUM_NODES##*[![:space:]]}"}"
1416
if [[ $NUM_NODES == 1 ]]; then
1517
REPLICAS=1
1618
fi

0 commit comments

Comments
 (0)