From 3093223788e65507da8bff1eea338f37e0c0a064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Mon, 18 Nov 2024 14:11:15 +0100 Subject: [PATCH] Fix no Gopass support --- tag_publish/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tag_publish/cli.py b/tag_publish/cli.py index 8ec2967..2cb323e 100644 --- a/tag_publish/cli.py +++ b/tag_publish/cli.py @@ -361,7 +361,10 @@ def _handle_docker_publish( if dry_run: sys.exit(0) - has_gopass = subprocess.run(["gopass", "--version"]).returncode == 0 # nosec # pylint: disable=subprocess-run-check + try: + has_gopass = subprocess.run(["gopass", "--version"]).returncode == 0 # nosec # pylint: disable=subprocess-run-check + except FileNotFoundError: + has_gopass = False if "SNYK_TOKEN" in os.environ or has_gopass: snyk_exec, env = tag_publish.snyk_exec() for image in images_snyk: