[X2Go-Commits] [nx-libs] 223/429: shellcheck: Fix SC2059 issue

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:36:37 CEST 2021


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 18aca1f69ce0b305c746b84ff90f8bf5a471ca33
Author: Mario Trangoni <mjtrangoni at gmail.com>
Date:   Sun Jan 31 14:31:41 2021 +0100

    shellcheck: Fix SC2059 issue
    
    See,
    
    $ find . -name "*.sh" | xargs shellcheck -i SC2059
    
    In ./version.sh line 34:
    printf "${VER}"
           ^------^ SC2059: Don't use variables in the printf format string. Use printf '..%s..' "$foo".
    
    For more information:
      https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf...
    
    Signed-off-by: Mario Trangoni <mjtrangoni at gmail.com>
---
 version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/version.sh b/version.sh
index 891536890..f46600c50 100755
--- a/version.sh
+++ b/version.sh
@@ -31,4 +31,4 @@ VER="$(head -n "1" "${VERSION_FILE}" | cut -d"." -f"${COMPONENT}")"
 
 [ "x${VER}" = "x" ] && VER="0"
 
-printf "${VER}"
+printf "%s" "${VER}"

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list