Skip to content

Commit

Permalink
fix: [#203] Instead of throwing an exit 1 if task version differs sho…
Browse files Browse the repository at this point in the history
…w a warning to improve the user experience (#204)
  • Loading branch information
sbp-bvanb authored Mar 7, 2025
1 parent 933c709 commit 889b382
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,25 @@ tasks:
exit 0
fi
echo "The version of the local task binary: ${current_task_version} differs from the expected: ${expected_task_version}."
echo "Resolve the issue by updating your local task binary to version: ${expected_task_version}."
echo "A remediation option is to run: 'go install github.com/go-task/task/v${expected_task_major_version}/cmd/task@v${expected_task_version}', but the choice of installation method depends on your preferred way to install Task."
exit 1
echo
echo "###############################################################"
echo "#"
echo "# WARNING"
echo "#"
echo "###############################################################"
echo "#"
echo "# The version of the local task binary: ${current_task_version}"
echo "# differs from the expected: ${expected_task_version}."
echo "# Resolve the issue by updating the local task binary to"
echo "# version: ${expected_task_version}."
echo "# A remediation option is to run:"
echo "# 'go install github.com/go-task/task/v${expected_task_major_version}/cmd/task@v${expected_task_version}',"
echo "# but the choice of installation method depends on the"
echo "# preferred way to install Task."
echo "#"
echo "###############################################################"
echo
sleep 3 # to ensure that user will see the message
fi
silent: true
keep-mcvs-golang-action-version-local-taskfile-in-sync-with-github-workflow:
Expand Down

0 comments on commit 889b382

Please sign in to comment.