From 982e703f2a1d705569d7f093ec51bde541dfbb4f Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Tue, 29 Jun 2021 18:36:35 -0400 Subject: [PATCH] entrypoint.sh: Small improvements We can't quote argument 1, as it is expected to contain multiple whitespace-seprated parameters and we need to expand any globs in it. This adds the use of "tee", so that the output goes to both the file specified in $2 and also to stdout (so the results are directly visible in the CI/CD display). Signed-off-by: David A. Wheeler --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4988bfe..30746e4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,5 @@ #!/bin/sh -l -# $1 arguments. BEWARE: Some filenames may need to be escaped. +# $1 whitespace-separated arguments. Some filenames may need to be escaped. # $2 output filename -flawfinder "$@" > "$2" +flawfinder $1 | tee "$2"