Improve update error catching

This commit is contained in:
Ryan Hughes
2025-10-23 21:33:23 -04:00
parent 50e68f466e
commit 413d292f2a
5 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
if [[ $# -lt 1 ]]; then if [[ $# -lt 1 ]]; then
echo "Usage: omarchy-hook [name] [args...]" echo "Usage: omarchy-hook [name] [args...]"
exit 1 exit 1

View File

@@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
COMMAND="$1" COMMAND="$1"
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy} OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}

View File

@@ -2,6 +2,8 @@
set -e set -e
trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR
omarchy-snapshot create || [ $? -eq 127 ] omarchy-snapshot create || [ $? -eq 127 ]
omarchy-update-git omarchy-update-git
omarchy-update-perform omarchy-update-perform

View File

@@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
echo -e "\e[32mUpdate Omarchy\e[0m" echo -e "\e[32mUpdate Omarchy\e[0m"
git -C $OMARCHY_PATH pull --autostash git -C $OMARCHY_PATH pull --autostash

View File

@@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
# Used in package emergencies if a bad package has been pushed and we can't revoke. # Used in package emergencies if a bad package has been pushed and we can't revoke.
# Requires manually installing the good package using sudo pacman -U <url> # Requires manually installing the good package using sudo pacman -U <url>
ignored_packages=$(omarchy-pkg-ignored) ignored_packages=$(omarchy-pkg-ignored)