Skip to content

Commit

Permalink
guard the shift in resty for call with no args
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrieanKhisbe committed Nov 8, 2017
1 parent 3f64ef2 commit 2e92d23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion resty
Expand Up @@ -24,7 +24,8 @@ export _RESTY_DATA_DIR _RESTY_CONF_DIR


function resty() {
local url; url="$1"; shift

local url; url="$1"; [ -n "$1" ] && shift
if [ -n "$url" ] && [[ "HEAD OPTIONS GET PATCH POST PUT TRACE DELETE" =~ $url ]] ; then
resty-call $url "$@"
return
Expand Down
1 change: 0 additions & 1 deletion test/resty_shpec.sh
Expand Up @@ -8,7 +8,6 @@ describe "Resty"
assert equal $? 0
end


it "can define a target"
output=$(resty localhost:4004 2>&1)
assert equal $? 0
Expand Down

0 comments on commit 2e92d23

Please sign in to comment.