actions/toolkit

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..

Bump. Any way for action code to detect the raw value that the user gave would help here.