From 4ee48dd238fa45e09c9692bfbbc9a65de549dbc0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 31 Aug 2025 09:21:02 +0200 Subject: [PATCH] Switch from returns to exit codes --- bin/omarchy-cmd-missing | 4 ++-- bin/omarchy-cmd-present | 4 ++-- bin/omarchy-pkg-add | 4 ++-- bin/omarchy-pkg-missing | 4 ++-- bin/omarchy-pkg-present | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/omarchy-cmd-missing b/bin/omarchy-cmd-missing index fad91ce..4658d37 100755 --- a/bin/omarchy-cmd-missing +++ b/bin/omarchy-cmd-missing @@ -2,8 +2,8 @@ for cmd in "$@"; do if ! command -v "$cmd" &>/dev/null; then - return 0 + exit 0 fi done -return 1 +exit 1 diff --git a/bin/omarchy-cmd-present b/bin/omarchy-cmd-present index 7c703b4..fecdc94 100755 --- a/bin/omarchy-cmd-present +++ b/bin/omarchy-cmd-present @@ -1,7 +1,7 @@ #!/bin/bash for cmd in "$@"; do - command -v "$cmd" &>/dev/null || return 1 + command -v "$cmd" &>/dev/null || exit 1 done -return 0 +exit 0 diff --git a/bin/omarchy-pkg-add b/bin/omarchy-pkg-add index 1694336..58be1a1 100755 --- a/bin/omarchy-pkg-add +++ b/bin/omarchy-pkg-add @@ -1,7 +1,7 @@ #!/bin/bash for pkg in "$@"; do - pacman -Q "$pkg" &>/dev/null || return 1 + pacman -Q "$pkg" &>/dev/null done -return 0 +exit 0 diff --git a/bin/omarchy-pkg-missing b/bin/omarchy-pkg-missing index 9e340af..2556afe 100755 --- a/bin/omarchy-pkg-missing +++ b/bin/omarchy-pkg-missing @@ -2,8 +2,8 @@ for pkg in "$@"; do if ! pacman -Q "$pkg" &>/dev/null; then - return 0 + exit 0 fi done -return 1 +exit 1 diff --git a/bin/omarchy-pkg-present b/bin/omarchy-pkg-present index 1694336..6afb1f5 100755 --- a/bin/omarchy-pkg-present +++ b/bin/omarchy-pkg-present @@ -1,7 +1,7 @@ #!/bin/bash for pkg in "$@"; do - pacman -Q "$pkg" &>/dev/null || return 1 + pacman -Q "$pkg" &>/dev/null || exit 1 done -return 0 +exit 0