From 0a6a4d08c69706542c88b831b456fcba8293dc2d Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 17 Jan 2019 12:48:34 -0500 Subject: Use exit status rather than string emptiness --- package.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.inc.sh b/package.inc.sh index 7af7a82..66a83c6 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -135,7 +135,7 @@ package_export() { subtree=repos/$repo-$OPT_ARCH fi - if [[ -z $(git ls-tree "remotes/$remote/packages/$pkgname" "$subtree/") ]]; then + if ! git ls-tree "remotes/$remote/packages/$pkgname" "$subtree/" &>/dev/null; then if [[ $repo ]]; then log_error "package '%s' not found in repo '%s-%s'" "$pkgname" "$repo" "$OPT_ARCH" return 1 -- cgit v1.2.3-70-g09d2