Uh oh!
There was an error while loading. Please reload this page.
Add output parameters for the tool path and version - #66
Conversation
| if (!$args.Count -or !$args[0]) | ||
| { | ||
| throw "Must supply java version argument" | ||
| throw "::error::Must supply java version argument" |
There was a problem hiding this comment.
Looks good! Thanks for submitting this PR.
The only question I have is regarding this ::error:: syntax. Is there any benefit to doing this? I haven't seen any of our other first party actions use this (I want to maintain some level of consistency). Online I can't seen to find anything either.
There was a problem hiding this comment.
This is https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message, as seen in @actions/core's error() too as an implementation detail.
Not sure about the throw in PowerShell though, but according to https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_throw?view=powershell-7 this should work too.
There was a problem hiding this comment.
I played around this, it makes the error message show up red in the logs so it's a pretty nice addition 😃
It doesn't fail the step though so exit 1 is still needed (for bash).
If Powershell it's redundant as throw will make the logs show up red and it will fail the step so the extra ::errror:: is not needed
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This allows calling the action multiple times in the same job and retrieving the path and/or version in other steps. Fixesactions#65
tbroyer
commented
May 27, 2020
Force-pushed with the PowerShell changes. |
konradpabjan
commented
May 27, 2020
Did some extra testing and everything is 👍 Thanks for the contribution @tbroyer 🎉🎈 |
Add output parameters for the tool path and version


This allows calling the action multiple times in the
same job and retrieving the path and/or version in
other steps.
Fixes#65