Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use command -v instead which command #3154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export TEST_GPG_KEYHOME=${test_tmpdir}/gpghome
export OSTREE_GPG_HOME=${test_tmpdir}/gpghome/trusted

assert_has_setfattr() {
if ! which setfattr 2>/dev/null; then
if ! command -v setfattr 2>/dev/null; then
fatal "no setfattr available to determine xattr support"
fi
}
Expand Down Expand Up @@ -725,9 +725,9 @@ which_gpg () {
local opt

# Prefer gpg2 in case gpg refers to gpg1
if which gpg2 &>/dev/null; then
if command -v gpg2 &>/dev/null; then
gpg=gpg2
elif which gpg &>/dev/null; then
elif command -v gpg &>/dev/null; then
gpg=gpg
else
# Succeed but don't return anything.
Expand Down
2 changes: 1 addition & 1 deletion tests/test-delta-ed25519.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ostree_repo_init repo --mode=archive

mkdir files
for bin in ${bindatafiles}; do
cp $(which ${bin}) files
cp $(command -v ${bin}) files
done

${CMD_PREFIX} ostree --repo=repo commit -b test -s test --tree=dir=files
Expand Down
2 changes: 1 addition & 1 deletion tests/test-delta-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ostree_repo_init repo --mode=archive

mkdir files
for bin in ${bindatafiles}; do
cp $(which ${bin}) files
cp $(command -v ${bin}) files
done

${CMD_PREFIX} ostree --repo=repo commit -b test -s test --tree=dir=files
Expand Down
2 changes: 1 addition & 1 deletion tests/test-delta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ostree_repo_init repo --mode=archive

mkdir files
for bin in ${bindatafiles}; do
cp $(which ${bin}) files
cp $(command -v ${bin}) files
done

${CMD_PREFIX} ostree --repo=repo commit -b test -s test --tree=dir=files
Expand Down
Loading