From 12e6ca0d6ccb9db53d1064845a4056dbd1df72ff Mon Sep 17 00:00:00 2001 From: rdinardi-bw <39524010+rdinardi-bw@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:37:58 -0400 Subject: [PATCH] Using POSIX complaint way to determine first char --- vault-shim-installer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vault-shim-installer.sh b/vault-shim-installer.sh index 1fed875..1e6bc33 100755 --- a/vault-shim-installer.sh +++ b/vault-shim-installer.sh @@ -7,7 +7,8 @@ if [ -z "$version" ]; then fi # check if the version starts without a 'v', if so, add it -if [ "${version:0:1}" != "v" ]; then +firstchar="$(echo $version | cut -c1-1)" +if [ "$firstchar" != "v" ]; then version="v$version" fi