Compare commits

...

4 Commits

Author SHA1 Message Date
Taiki Endo
dc56670325 Release 2.1.2 2023-01-06 01:12:23 +09:00
Taiki Endo
d2ab9b9652 Improve warning if tool is not specified
Suggested in https://github.com/taiki-e/install-action/issues/43#issuecomment-1372352184.
2023-01-06 00:52:11 +09:00
Taiki Endo
5e7708e596 Release 2.1.1 2023-01-06 00:19:47 +09:00
Taiki Endo
ad09286c82 Emit warning if tool is not specified
If you encounter this warning, it may be due to a dependabot bug that
handles `@<tool>` shorthand in wrong way.

Previously, the handling of this case was platform-dependent and may or
may not have resulted in an error.
2023-01-06 00:12:24 +09:00
2 changed files with 21 additions and 1 deletions

View File

@@ -10,6 +10,18 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.1.2] - 2023-01-05
- Diagnostic improvements.
## [2.1.1] - 2023-01-05
- Emit warning if tool is not specified.
If you encounter this warning, it may be due to a dependabot bug that handles `@<tool>` shorthand in wrong way.
Previously, the handling of this case was platform-dependent and may or may not have resulted in an error.
## [2.1.0] - 2023-01-05
- Support `grcov`. ([#41](https://github.com/taiki-e/install-action/pull/41), thanks @thomcc)
@@ -508,7 +520,9 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.1.0...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.1.2...HEAD
[2.1.2]: https://github.com/taiki-e/install-action/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/taiki-e/install-action/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/taiki-e/install-action/compare/v2.0.3...v2.1.0
[2.0.3]: https://github.com/taiki-e/install-action/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/taiki-e/install-action/compare/v2.0.1...v2.0.2

View File

@@ -419,6 +419,12 @@ if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null || ! type -P tar &>/de
esac
fi
if [[ ${#tools[@]} -eq 0 ]]; then
warn "no tool specified; this could be caused by a dependabot bug where @<tool_name> tags on this action are replaced by @<version> tags"
# Exit with 0 for backward compatibility, we want to reject it in the next major release.
exit 0
fi
for tool in "${tools[@]}"; do
if [[ "${tool}" == *"@"* ]]; then
version="${tool#*@}"