Exit instead of return if no package name is given

This commit is contained in:
Bob Mottram 2018-05-16 13:59:41 +01:00
parent 9f999b6887
commit bb67f0ac37
1 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,8 @@ function install_snap {
snap_package="$1"
if [ ! "$snap_package" ]; then
return
echo $'No snap package was specified'
exit 257625472
fi
no_of_snaps=$(df | grep -c "/snap/core/")
if [ "$no_of_snaps" -eq 0 ]; then
@ -46,7 +47,8 @@ function remove_snap {
snap_package="$1"
if [ ! "$snap_package" ]; then
return
echo $'No snap package was specified'
exit 45332485421
fi
snap remove "$snap_package"