diff mbox series

[02/10] base-files: upgrade: use stdin redirection to replace cat command

Message ID 20201103122107.30400-3-yszhou4tech@gmail.com
State Superseded, archived
Delegated to: Yousong Zhou
Headers show
Series sysupgrade: reword and organize log lines | expand

Commit Message

Yousong Zhou Nov. 3, 2020, 12:20 p.m. UTC
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
 package/base-files/files/lib/upgrade/common.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 56daabd778..808fad178b 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -91,7 +91,7 @@  get_image() { # <source> [ <command> ]
 		esac
 	fi
 
-	cat "$from" 2>/dev/null | $cmd
+	$cmd <"$from"
 }
 
 get_magic_word() {