set PKCS11_MODULE in tmux only if itselt is defined

This commit is contained in:
Jakobus Schürz 2023-03-01 13:37:05 +01:00
parent 424a923257
commit 610fb282ee

View file

@ -50,7 +50,7 @@ function _pkcs11module_hook() {
loginfo "PKCS11_MODULE: $PKCS11_MODULE" loginfo "PKCS11_MODULE: $PKCS11_MODULE"
if [ -n "${TMUX}" ]; then if [ -n "${TMUX}" -a -n "${PKCS11_MODULE}" ]; then
logdebug "set PKCS11_MODULE also in tmux environment" logdebug "set PKCS11_MODULE also in tmux environment"
tmux set-environment PKCS11_MODULE ${PKCS11_MODULE} tmux set-environment PKCS11_MODULE ${PKCS11_MODULE}
tmux set-environment -g PKCS11_MODULE ${PKCS11_MODULE} tmux set-environment -g PKCS11_MODULE ${PKCS11_MODULE}