Skip to content
Browse files

fixed issue with -V option causing blocking when input not provided o…

…n stdin
  • Loading branch information...
1 parent aab2daf commit 27489d43fe9ec20a1543114cdbe5f2ecc191603d @micha committed Jan 7, 2011
Showing with 10 additions and 2 deletions.
  1. +8 −0 CHANGES
  2. +2 −2 resty
View
8 CHANGES
@@ -0,0 +1,8 @@
+Resty CHANGES
+=============
+
+Version 1.1 (2011-01-07)
+------------------------
+
+* Fixed bug where -V option required input on stdin, and would block waiting
+ for it.
View
4 resty
@@ -53,9 +53,9 @@ function resty() {
dat=$( ( [ "$hasdata" = "yes" ] \
&& ( ( [ -n "$1" ] && [ "${1#-}" = "$1" ] && echo "$1") \
|| echo "@-") ) || echo)
- if [ "$hasdata" = "yes" ] && [ "$1" = "-V" ]; then
+ if [ "$hasdata" = "yes" ] && [ "$vimedit" = "yes" ]; then
tmpf=$(mktemp /tmp/resty.XXXXXX)
- cat > $tmpf
+ [ -t 0 ] || cat > $tmpf
(exec < /dev/tty; "$editor" $tmpf)
dat=$(cat $tmpf)
rm -f $tmpf

0 comments on commit 27489d4

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