From 4581a6bffd3bb69026230512836cefaed91fc1c9 Mon Sep 17 00:00:00 2001 From: sev Date: Sun, 20 Mar 2022 00:43:55 -0500 Subject: [PATCH] fix gpg forward GNUPGHOME reset in cleanup --- base/.zprofile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/base/.zprofile b/base/.zprofile index 0d8a1a7..f611b98 100644 --- a/base/.zprofile +++ b/base/.zprofile @@ -44,13 +44,8 @@ function _sev_zcleanup { } } # reset GNUPGHOME if we removed our own dir - if [[ $GNUPGHOME =~ '/.ssh_forward/\d+/*$' && ! -e $GNUPGHOME ]] { - x=$GNUPGHOME - [[ -o GLOB_ASSIGN ]]; y=$? - setopt GLOB_ASSIGN - GNUPGHOME=$GNUPGHOME/../..(:a) - (( y != 0 )) && unsetopt GLOB_ASSIGN - } + if [[ $GNUPGHOME =~ '/.ssh_forward/\d+/*$' && ! -e $GNUPGHOME ]] + GNUPGHOME=${GNUPGHOME%$MATCH} } ## tmp -- 2.47.0