From dce2a28b310b500a7705ca38019a5918811f38bc Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 15 Dec 2024 18:31:17 +0200 Subject: [PATCH] pre-commit: Address some warnings. --- .pre-commit-config.yaml | 2 +- Ansible/roles/debian_server/files/dvb | 4 ++-- Ansible/roles/debian_server/files/offsite-backup | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 408ee17..a1bf2e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: codespell args: - - '-L=doas,fo' + - '-L=doas,fo,anull' - repo: https://github.com/Yelp/detect-secrets.git rev: v1.5.0 diff --git a/Ansible/roles/debian_server/files/dvb b/Ansible/roles/debian_server/files/dvb index 00d0ed5..688e27d 100755 --- a/Ansible/roles/debian_server/files/dvb +++ b/Ansible/roles/debian_server/files/dvb @@ -28,7 +28,7 @@ then usage elif [ ! -d "$1" ] then - echo "Destinaton $1 not found or is not a directory." >&2 + echo "Destination $1 not found or is not a directory." >&2 exit 1 elif [ "$(id -u)" -ne 0 ] then @@ -70,7 +70,7 @@ for name in $(docker volume ls --filter label=snapshot=true --format '{{ .Name } do echo "Backing up $name." mountpoint="$(docker volume inspect --format '{{ .Mountpoint }}' "$name")" - src="$snapshot/${mountpoint#$root_volume/}" + src="$snapshot/${mountpoint#"$root_volume"/}" # shellcheck disable=SC2115 [ ! -e "$dest/$name" ] || rm -rf "$dest/$name" cp --archive --force --reflink=always "$src" "$dest/$name" diff --git a/Ansible/roles/debian_server/files/offsite-backup b/Ansible/roles/debian_server/files/offsite-backup index 1534ed5..f4273db 100755 --- a/Ansible/roles/debian_server/files/offsite-backup +++ b/Ansible/roles/debian_server/files/offsite-backup @@ -52,7 +52,7 @@ volume="$(root_subvolume /var/backups)" snapshot="$(mktemp --dry-run "--tmpdir=$volume")" btrfs subvolume snapshot -r "$volume" "$snapshot" source="/var/backups" -source="${snapshot}${source#$volume}/" +source="${snapshot}${source#"$volume"}/" sync --file-system /var/backups rsync --archive \ -- GitLab