Skip to content

Commit 7cc90fb

Browse files
noerwGusted
and
Gusted
authored
Replace which with command -v
Co-authored-by: Gusted <[email protected]>
1 parent 97b8524 commit 7cc90fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/upgrade.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55
# from dl.gitea.io on linux as systemd service. It performs a backup and updates
66
# Gitea in place.
77
# NOTE: This adds the GPG Signing Key of the Gitea maintainers to the keyring.
8-
# Depends on: bash, curl, xz, sha256sum, gpg, which. optionally jq.
8+
# Depends on: bash, curl, xz, sha256sum, gpg. optionally jq.
99
# Usage: [environment vars] upgrade.sh [version]
1010
# See section below for available environment vars.
1111
# When no version is specified, updates to the latest release.
@@ -28,7 +28,7 @@ function giteacmd {
2828

2929
function require {
3030
for exe in "$@"; do
31-
which "$exe" &>/dev/null || (echo "missing dependency '$exe'"; exit 1)
31+
command -v "$exe" &>/dev/null || (echo "missing dependency '$exe'"; exit 1)
3232
done
3333
}
3434
require systemctl curl xz sha256sum gpg "$sudocmd"

0 commit comments

Comments
 (0)