Skip to content
Browse files

Merge pull request #40 from pcl/master

Pull request -- avoid 'grep *' in cwd when no config files exist.
  • Loading branch information...
2 parents 58560a1 + 23db39a commit 68e5d0513ff048fb6ddf934716b0a16dfbc84d92 @micha committed Oct 16, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 resty
View
2 resty
@@ -81,7 +81,7 @@ function resty() {
[ "$1" = "-Z" ] && raw="yes" && [[ $# > 0 ]] && shift
[ -n "$dat" ] && opt="--data-binary"
[ "$method" = "HEAD" ] && opt="-I" && raw="yes"
- eval "args2=( $(cat "$confdir/$domain" 2>/dev/null |sed 's/^ *//' |grep ^$method |cut -b $((${#method}+2))-) )"
+ [ -f "$confdir/$domain" ] && eval "args2=( $(cat "$confdir/$domain" 2>/dev/null |sed 's/^ *//' |grep ^$method |cut -b $((${#method}+2))-) )"
res=$((((curl -sLv $opt "$dat" -X $method \
-b "$cookies/$domain" -c "$cookies/$domain" \
"${args2[@]}" "${curlopt2[@]}" "${curlopt[@]}" "$_path$query" \

0 comments on commit 68e5d05

Please sign in to comment.
Something went wrong with that request. Please try again.