Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Adams <[email protected]>
  • Loading branch information
jpadams committed Dec 22, 2024
1 parent 566e23f commit 55c36bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,19 @@ runs:
# If the dagger version is 'latest', set the version back to an empty
# string. This allows the install script to detect and install the latest
# version itself
# We remove any leading 'v' on VERSION here to ensure a match
VERSION=${{ inputs.version }}
if [[ "$VERSION" == "latest" ]]; then
VERSION=
else
VERSION=$(echo -n $VERSION | cut -d' ' -f2 | cut -dv -f2 | tr -d '\n')
fi
COMMIT=${{ inputs.commit }}
if [[ -x "$(command -v dagger)" ]]; then
pre_installed_version="$(dagger --silent version | cut --fields 2 --delimiter ' ')"
# get dagger version without leading 'v' and always without newline
pre_installed_version="$(dagger --silent version | cut -d' ' -f2 | cut -dv -f2 | tr -d '\n')"
if [[ "$pre_installed_version" != "$VERSION" ]]; then
echo "dagger ${pre_installed_version} is installed, but needed ${VERSION}"
exit 1
Expand Down

0 comments on commit 55c36bf

Please sign in to comment.