From ae682c2a3d009d3c803f78d57dc7e279fb761775 Mon Sep 17 00:00:00 2001 From: "Deavon M. McCaffery" Date: Tue, 24 Nov 2020 02:49:45 +0000 Subject: [PATCH] fix(switch-smart-card): ignore missing keygrips --- .github/workflows/release.yml | 2 +- src/sh/scripts/switch-smart-card | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bcea8f6..433c8f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,8 +4,8 @@ on: push: branches: - master - - release/* - next + - +([0-9])?(.{+([0-9]),x}).x jobs: release: diff --git a/src/sh/scripts/switch-smart-card b/src/sh/scripts/switch-smart-card index dd9c6b7..dae08fc 100755 --- a/src/sh/scripts/switch-smart-card +++ b/src/sh/scripts/switch-smart-card @@ -23,7 +23,7 @@ KEYGRIPS="$(gpg --with-keygrip --list-secret-keys $@ | grep Keygrip | awk '{prin for keygrip in $KEYGRIPS; do # remove the keygrip - rm "$HOME/.gnupg/private-keys-v1.d/$keygrip.key" 2> /dev/null + rm "$HOME/.gnupg/private-keys-v1.d/$keygrip.key" 2>/dev/null || true done # print the card status