Browse Source

Handle file not found error

Add exit code 1 when no suitable file is found
pull/142/head
KKV9 2 years ago
parent
commit
3a48d52e34
  1. 7
      config/hypr/UserScripts/Sounds.sh

7
config/hypr/UserScripts/Sounds.sh

@ -45,6 +45,11 @@ else
elif test -f "$userDIR/$defaultTheme/$soundoption"; then
pw-play "$userDIR/$defaultTheme/$soundoption"
else
pw-play "$systemDIR/$defaultTheme/$soundoption"
if test -f "$systemDIR/$defaultTheme/$soundoption"; then
pw-play "$systemDIR/$defaultTheme/$soundoption"
else
echo "Error: Sound file not found."
exit 1
fi
fi
fi

Loading…
Cancel
Save