From e835acf324c95a61bfac7c03ed4f88b717aa5603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Wed, 16 Oct 2024 00:53:43 +0200 Subject: [PATCH] WSL: fix downloader plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix downloader plugin, if helm is installed as native binary inside WSL Signed-off-by: Jan-Otto Kröpke --- 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..30823d05 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