From 35d5a3e9fb15451d65d4f9b123e3d0b22f4f5cb4 Mon Sep 17 00:00:00 2001 From: Stephen Abbene <11637137+sabbene@users.noreply.github.com> Date: Tue, 20 Jun 2023 12:57:38 -0700 Subject: [PATCH] Running superlinter as a user not defined in /etc/passwd causes error messages (#4351) * no need to run git check-ignore on every file if you are not setting IGNORE_GITIGNORED_FILES * use id instead of whoami for determining running and discard stderr * accidently include change from other PR * remove commented code --------- Co-authored-by: Zack Koppert --- lib/functions/validation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/validation.sh b/lib/functions/validation.sh index d9759707..24113f91 100755 --- a/lib/functions/validation.sh +++ b/lib/functions/validation.sh @@ -213,7 +213,7 @@ function GetValidationInfo() { debug "--- DEBUG INFO ---" debug "---------------------------------------------" - RUNNER=$(whoami) + RUNNER=$(id -un 2>/dev/null) debug "Runner:[${RUNNER}]" PRINTENV=$(printenv | sort) debug "ENV:"