From 9d1cb8cbed9b764f29e12492fc54f63047809f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 7 Jun 2021 02:32:42 +0200 Subject: [PATCH] Use cygpath for HELM_BIN --- install-binary.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install-binary.sh b/install-binary.sh index 7fb33382..4293eb0a 100755 --- a/install-binary.sh +++ b/install-binary.sh @@ -6,19 +6,21 @@ PROJECT_NAME="helm-diff" PROJECT_GH="databus23/$PROJECT_NAME" export GREP_COLOR="never" -HELM_MAJOR_VERSION=$("${HELM_BIN}" version --client --short | awk -F '.' '{print $1}') - -: ${HELM_PLUGIN_DIR:="$("${HELM_BIN}" home --debug=false)/plugins/helm-diff"} -# Convert the HELM_PLUGIN_DIR to unix if cygpath is +# Convert HELM_BIN and HELM_PLUGIN_DIR to unix if cygpath is # available. This is the case when using MSYS2 or Cygwin # on Windows where helm returns a Windows path but we # need a Unix path if type cygpath >/dev/null 2>&1; then - HELM_PLUGIN_DIR=$(cygpath -u $HELM_PLUGIN_DIR) + HELM_BIN="$(cygpath -u "${HELM_BIN}")" + HELM_PLUGIN_DIR="$(cygpath -u "${HELM_PLUGIN_DIR}")" fi +HELM_MAJOR_VERSION=$("${HELM_BIN}" version --client --short | awk -F '.' '{print $1}') + +: ${HELM_PLUGIN_DIR:="$("${HELM_BIN}" home --debug=false)/plugins/helm-diff"} + if [ "$SKIP_BIN_INSTALL" = "1" ]; then echo "Skipping binary install" exit