Skip to content

Commit

Permalink
Add non empty check for is_sles
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanduplenskikh committed Nov 8, 2024
1 parent f6a4412 commit 8aba6d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Misc/layoutbin/installdependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ function print_rhel6depricationmessage()
echo "You can check supported OS on the following documentation: https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md"
}

function print_banner()
{
echo "--------$1--------"
echo $2
echo "------------------------------"
}

if [ -e /etc/os-release ]
then
filepath='/etc/os-release'
Expand Down Expand Up @@ -271,7 +278,7 @@ then
is_sles=1
fi

if ([[ -n $OSTYPE ]] && ([[ $OSTYPE == *"suse"* ]] || [[$is_sles == 1]]))
if ([[ -n $OSTYPE ]] && ([[ $OSTYPE == *"suse"* ]] || ([[ -n $is_sles ]] && [[ $is_sles == 1 ]])))
then
echo "The current OS is SUSE based"
command -v zypper
Expand Down

0 comments on commit 8aba6d4

Please sign in to comment.