Skip to content

Commit e466610

Browse files
committed
refresh_rhcos: Check for OS_CLOUD later
So that -h actually works even if OS_CLOUD is unset. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 3adf1d2 commit e466610

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

refresh_rhcos.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ function show_usage() {
1414
exit 0
1515
}
1616

17-
if [ -z "$OS_CLOUD" ]; then
18-
echo 'Set your OS_CLOUD environment variable'
19-
exit 1
20-
fi
21-
2217
BRANCH="4.2"
2318

2419
opts=$(getopt -n "$0" -o "b:h" --long 'branch:,help' -- "$@")
@@ -43,6 +38,11 @@ while [[ $# -gt 0 ]]; do
4338
esac
4439
done
4540

41+
if [ -z "$OS_CLOUD" ]; then
42+
echo 'Set your OS_CLOUD environment variable'
43+
exit 1
44+
fi
45+
4646
if [ "$BRANCH" == "4.2" ]; then
4747
REAL_BRANCH_NAME="release-$BRANCH"
4848
# We want to leave 4.2 image under the rhcos name

0 commit comments

Comments
 (0)