Skip to content

Commit 1772a20

Browse files
committed
detect-environment: changed two if's to if/elif
If the former if condition is true, then the latter implicitly cannot be true. Hence, there is no point in evaluating it. Ticket: ENT-12600 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent f91db14 commit 1772a20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build-scripts/detect-environment

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ detect_distribution()
213213
if [ "$os" = "sles" ]; then
214214
OS=sles
215215
OS_VERSION="$ver"
216-
fi
217-
if expr "$os" : "opensuse" >/dev/null; then
216+
elif expr "$os" : "opensuse" >/dev/null; then
217+
# If the string begins with "opensuse", then strip the remaining part. It
218218
# can be "opensuse-leap" or "opensuse-tumbleweed"
219219
OS=opensuse
220220
OS_VERSION="$ver"

0 commit comments

Comments
 (0)