diff --git a/README.md b/README.md index ebd6478..b172572 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ Why did I choose it? : Someday, I may rewrite readlineSync to use child_process.execSync, or safety module. ## Release History + * 2014-09-12 v0.4.8 fixed #9: Error of `stty` in read.sh. * 2014-07-13 v0.4.3 fixed #6: Crypto input data. * 2014-07-12 v0.4.2 `setPrompt()` and `setEncoding()` return current value. * 2014-07-12 v0.4.1 `setPrompt()` and `question()` accept the value which is not string too (e.g. number, Date, Object, etc.). diff --git a/lib/read.sh b/lib/read.sh index 514bfe1..5c6cfb8 100644 --- a/lib/read.sh +++ b/lib/read.sh @@ -1,7 +1,7 @@ if [ "$1" = "noechoback" ]; then - stty -F /dev/tty -echo echonl + stty --file=/dev/tty -echo echonl || stty -F /dev/tty -echo echonl || stty -f /dev/tty -echo echonl || exit 1 read LINE /dev/tty else read LINE "' + pathStdout + '";' + - ' echo $? >"' + pathStatus + '"; echo 1 >"' + pathDone + '"']; + ' >"' + pathStdout + '") fi;' + + ' expr $RTN + $? >"' + pathStatus + '"; echo 1 >"' + pathDone + '"']; } stdin.pause(); // re-start in child process diff --git a/package.json b/package.json index a6e1ddc..31b5960 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "readline-sync", "description": "Synchronous Readline", - "version": "0.4.7", + "version": "0.4.8", "homepage": "https://github.com/anseki/readline-sync", "author": { "name": "anseki"