From 0e3c12778d0ab25d067eaa678630528428343ebf Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Mon, 22 May 2023 11:05:32 +0200 Subject: [PATCH] Make test scripts run without /bin/bash The test scripts hardcoded #!/bin/bash while they are not really requiring bash. Use the more portable #!/usr/bin/env sh instead, so that they use the default shell. Signed-off-by: Tom Wieczorek --- cmd/helm/testdata/helmhome/helm/plugins/args/args.sh | 4 ++-- cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh | 4 ++-- pkg/getter/testdata/plugins/testgetter/get.sh | 4 ++-- pkg/getter/testdata/plugins/testgetter2/get.sh | 4 ++-- pkg/plugin/testdata/plugdir/good/hello/hello.sh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/args.sh b/cmd/helm/testdata/helmhome/helm/plugins/args/args.sh index 678b4eff5..6c62be8b9 100755 --- a/cmd/helm/testdata/helmhome/helm/plugins/args/args.sh +++ b/cmd/helm/testdata/helmhome/helm/plugins/args/args.sh @@ -1,2 +1,2 @@ -#!/bin/bash -echo $* +#!/usr/bin/env sh +echo "$@" diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh b/cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh index ec8469657..9cf68da68 100755 --- a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh +++ b/cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh @@ -1,2 +1,2 @@ -#!/bin/bash -exit $* +#!/usr/bin/env sh +exit "$1" diff --git a/pkg/getter/testdata/plugins/testgetter/get.sh b/pkg/getter/testdata/plugins/testgetter/get.sh index cdd992369..c3c168993 100755 --- a/pkg/getter/testdata/plugins/testgetter/get.sh +++ b/pkg/getter/testdata/plugins/testgetter/get.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/usr/bin/env sh echo ENVIRONMENT env echo "" echo ARGUMENTS -echo $@ +echo "$@" diff --git a/pkg/getter/testdata/plugins/testgetter2/get.sh b/pkg/getter/testdata/plugins/testgetter2/get.sh index cdd992369..c3c168993 100755 --- a/pkg/getter/testdata/plugins/testgetter2/get.sh +++ b/pkg/getter/testdata/plugins/testgetter2/get.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/usr/bin/env sh echo ENVIRONMENT env echo "" echo ARGUMENTS -echo $@ +echo "$@" diff --git a/pkg/plugin/testdata/plugdir/good/hello/hello.sh b/pkg/plugin/testdata/plugdir/good/hello/hello.sh index dcfd58876..4f20796ef 100755 --- a/pkg/plugin/testdata/plugdir/good/hello/hello.sh +++ b/pkg/plugin/testdata/plugdir/good/hello/hello.sh @@ -1,9 +1,9 @@ -#!/bin/bash +#!/usr/bin/env sh echo "Hello from a Helm plugin" echo "PARAMS" -echo $* +echo "$@" $HELM_BIN ls --all