[openwrt/openwrt] scripts/env: use read -r instead of read

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 11 09:54:50 EDT 2020


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5b7cace9e3f553ca54e1e0ec5f7651b7d7a2052d

commit 5b7cace9e3f553ca54e1e0ec5f7651b7d7a2052d
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun Jan 5 18:32:38 2020 -0800

    scripts/env: use read -r instead of read
    
    read mangles backslashes.
    
    Found with shellcheck.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 848850a778..c81fbf8ddc 100755
--- a/scripts/env
+++ b/scripts/env
@@ -42,7 +42,7 @@ ask_bool() {
 		local VAL
 
 		echo -n "$* ($defstr): "
-		read VAL
+		read -r VAL
 		case "$VAL" in
 			y*|Y*) val=0;;
 			n*|N*) val=1;;



More information about the lede-commits mailing list