Skip to content

Commit

Permalink
shell: Disable shellcheck warning in ssh-add-key.sh
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinpitt authored and allisonkarlitskaya committed Jul 11, 2024
1 parent 021ac3b commit 213ceb6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/shell/machines/ssh-add-key.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 213ceb6

Please sign in to comment.