Skip to content

Commit 3e2782a

Browse files
authored
install-binary.sh: Use $HELM_BIN in HELM_HOME assignment (#1030)
When a command named 'helm' does not actually exist (for example when Helm is invoked as 'helm4' or similar), an error like the following may be printed even if installation then continues to apparently succeed. [/path/to]/helm/plugins/4/helm-diff/install-binary.sh: 19: helm: not found mkdir: cannot create directory '': No such file or directory
1 parent 34f1f58 commit 3e2782a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

install-binary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if command -v cygpath >/dev/null 2>&1; then
1616
fi
1717

1818
[ -z "$HELM_BIN" ] && HELM_BIN=$(command -v helm)
19-
[ -z "$HELM_HOME" ] && HELM_HOME=$(helm env | grep 'HELM_DATA_HOME' | cut -d '=' -f2 | tr -d '"')
19+
[ -z "$HELM_HOME" ] && HELM_HOME=$($HELM_BIN env | grep 'HELM_DATA_HOME' | cut -d '=' -f2 | tr -d '"')
2020
mkdir -p "$HELM_HOME"
2121
: "${HELM_PLUGIN_DIR:="$HELM_HOME/plugins/helm-diff"}"
2222

0 commit comments

Comments
 (0)