mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-08 22:00:31 +00:00
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.
This commit is contained in:
@@ -10,6 +10,12 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- 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
|
## [2.1.0] - 2023-01-05
|
||||||
|
|
||||||
- Support `grcov`. ([#41](https://github.com/taiki-e/install-action/pull/41), thanks @thomcc)
|
- Support `grcov`. ([#41](https://github.com/taiki-e/install-action/pull/41), thanks @thomcc)
|
||||||
|
|||||||
6
main.sh
6
main.sh
@@ -419,6 +419,12 @@ if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null || ! type -P tar &>/de
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${#tools[@]} -eq 0 ]]; then
|
||||||
|
warn "no tool specified; this may caused by dependabot bug that handles '@<tool>' shorthand in wrong way"
|
||||||
|
# Exit with 0 for backward compatibility, we want to reject it in the next major release.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
for tool in "${tools[@]}"; do
|
for tool in "${tools[@]}"; do
|
||||||
if [[ "${tool}" == *"@"* ]]; then
|
if [[ "${tool}" == *"@"* ]]; then
|
||||||
version="${tool#*@}"
|
version="${tool#*@}"
|
||||||
|
|||||||
Reference in New Issue
Block a user