From a0ecfd13a9104eac79946a77ac2a3cf4485f0487 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Wed, 6 Jul 2022 12:31:48 -0400 Subject: [PATCH] roc-obj-extract: Only push STDIN if there are no arguments - Otherwise this consumes the caller's stdin by accident. Patch by: - Bolo -- Josef Burger - https://github.com/bigtrak Change-Id: I669376c025c0cde2cfdd59b5a4a14a71c5d8e862 --- hipamd/bin/roc-obj-extract | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hipamd/bin/roc-obj-extract b/hipamd/bin/roc-obj-extract index bdbe17a1ae..9420a4b059 100755 --- a/hipamd/bin/roc-obj-extract +++ b/hipamd/bin/roc-obj-extract @@ -90,8 +90,12 @@ if (defined $options{o}) { } } +# Only push STDIN if there are no arguments -- otherwise this +# consumes the caller's stdin by accident. # push STDIN to ARGV array. -push @ARGV, unless -t STDIN; +if ($#ARGV < 0) { + push @ARGV, unless -t STDIN; +} # error check: enough arguments presented. if ($#ARGV < 0) {