From e3e45f5795c706e613f65bed612ea297975f2038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 4 Nov 2024 23:25:31 +0100 Subject: [PATCH] WSL: fix downloader plugin (#482) --- scripts/lib/common.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index 8c9b66ee..328936ee 100644 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -106,6 +106,7 @@ CYGWIN* | MINGW64_NT*) printf '%s' "${1}" | cygpath -w -l -f - fi } + _helm_winpath() { _winpath "$@"; } _sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml" @@ -129,13 +130,14 @@ Darwin) fi } + # We are on a Linux VM, but helm.exe (Win32) is called case "${HELM_BIN}" in - *.exe) _helm_winpath() { _winpath "$@"; } ;; + *.exe) + _helm_winpath() { _winpath "$@"; } + + _sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml" + ;; esac fi ;; esac - -if on_wsl || on_cygwin; then - _sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml" -fi