Skip to content

Commit

Permalink
Using POSIX complaint way to determine first char
Browse files Browse the repository at this point in the history
  • Loading branch information
rdinardi-bw committed Oct 7, 2024
1 parent a9f9459 commit 12e6ca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vault-shim-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 12e6ca0

Please sign in to comment.