Skip to content

Commit

Permalink
WSL: fix downloader plugin
Browse files Browse the repository at this point in the history
Fix downloader plugin, if helm is installed as native binary inside WSL

Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke authored Oct 15, 2024
1 parent d60a649 commit e835acf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

0 comments on commit e835acf

Please sign in to comment.