From 4608cbe1ce53819443f7660bf5f24df2de434ef2 Mon Sep 17 00:00:00 2001 From: Peter Butkovic Date: Fri, 27 Dec 2019 09:25:39 +0100 Subject: [PATCH] Windows with git-bash execution fix In windows environment (git-bash), the following command: `command -v "$0"` returns empty string. Therefor the `$_main` function is never called. So preventing any further checks, just calling the function with arguments. Not sure whether it could cause regressions to existing usages. --- bin/shpec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/shpec b/bin/shpec index 3ee0fa7..890d057 100755 --- a/bin/shpec +++ b/bin/shpec @@ -213,10 +213,6 @@ shpec() { } ( - _progname=shpec - _pathname=$( command -v "$0" ) - _cmdname=${_pathname##*/} _main=shpec - - case $_progname in (${_cmdname%.sh}) $_main "$@";; esac + $_main "$@" )