From 1c126f34d53d0b78b947690e27f2d05a9633c3fc Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Fri, 20 Dec 2024 15:07:21 -0500 Subject: [PATCH] Fix unintended output from conditional and eval error --- .post-commit-hook | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.post-commit-hook b/.post-commit-hook index f56ff6c..879fe07 100755 --- a/.post-commit-hook +++ b/.post-commit-hook @@ -1,8 +1,10 @@ #!/usr/bin/env bash +set -e + BASE_IMAGE=$(git config get toolbox-dev-env.base-image.name) -if git config get toolbox-dev-env.base-image.version-script; then - BASE_IMAGE_VERSION=eval $(git config get toolbox-dev-env.base-image.version-script) +if git config get toolbox-dev-env.base-image.version-script &>/dev/null; then + BASE_IMAGE_VERSION=$(eval $(git config get toolbox-dev-env.base-image.version-script)) else BASE_IMAGE_VERSION=$(git config get toolbox-dev-env.base-image.version) fi