From 213ceb6890ef90c65f07672c786c888f43fda2ee Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 9 Jul 2024 09:47:13 +0200 Subject: [PATCH] shell: Disable shellcheck warning in ssh-add-key.sh Shut up this warning: > warning[SC2174]: When used with -p, -m only applies to the deepest directory. This works as intended. We are about to move this script to pkg/lib, which triggers shellcheck to inspect that file. --- pkg/shell/machines/ssh-add-key.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/shell/machines/ssh-add-key.sh b/pkg/shell/machines/ssh-add-key.sh index 3fb53f9cb0f0..0e6c20930b74 100755 --- a/pkg/shell/machines/ssh-add-key.sh +++ b/pkg/shell/machines/ssh-add-key.sh @@ -7,6 +7,7 @@ p=${2:-authorized_keys} f=$d/$p if ! test -f "$f"; then + # shellcheck disable=SC2174 # yes, we know that -m only applies to the deepest directory mkdir -m 700 -p "$d" touch "$f" chmod 600 "$f"