From 40ed4e60ba4f399fb7d47b6d8a6c4dfb00364e8d Mon Sep 17 00:00:00 2001 From: Denis Isidoro Date: Sat, 5 Oct 2019 14:17:41 -0300 Subject: [PATCH] Fix command_exists for empty string --- src/misc.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/misc.sh b/src/misc.sh index 4acdce8..1a87209 100644 --- a/src/misc.sh +++ b/src/misc.sh @@ -1,12 +1,8 @@ #!/usr/bin/env bash -# no-op hack to set dependency order resolution -dep() { - : -} - command_exists() { - type "$1" &> /dev/null + local -r cmd="${1:-}" + [ -n $cmd ] && type "$cmd" &> /dev/null } platform::existing_command() {