Numerical removal of trailing zeros breaks version number inputs not entered as strings
IanButterworth opened this issue · 2 comments
Describe the bug
This issue is more general, but specifically a problem for version numbers.
Take
with:
version: 1.10
getInput
returns this as a string "1.1"
, whereas
with:
version: '1.10'
getInput
returns a string "1.10"
.
In version numbers 1.1 != 1.10, and it's not possible for the action to defend against this to tell whether the entry might have been treated as a number before being presented as a string.
Expected behavior
getInput
provide a way to get the raw entry, or indicate if input has been treated as a number before being returned as a string.
Or just never drop trailing zeros..
Perhaps this needs to be fixed on the runner side, which I believe would be here or earlier https://github.com/actions/runner/blob/2c8c9416224ad5e9926626d1360311568eefefd1/src/Runner.Worker/Handlers/Handler.cs#L186
https://github.com/actions/runner/blob/2c8c9416224ad5e9926626d1360311568eefefd1/src/Runner.Worker/ActionRunner.cs#L216
Bump. Any way for action code to detect the raw value that the user gave would help here.