🐛 Make kebab options fall back for snake_case

The previous release didn't take into account the action defaults so
the promised fallbacks for the old input names didn't work. This patch
corrects that mistake.
This commit is contained in:
Sviatoslav Sydorenko
2023-03-11 03:06:39 +01:00
parent 7104b6e981
commit 22b4d1f125
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -25,7 +25,10 @@ function get-normalized-input() {
from os import getenv
from sys import argv
envvar_name = f"INPUT_{argv[1].upper()}"
print(getenv(envvar_name, getenv(envvar_name.replace("-", "_"), "")), end="")
print(
getenv(envvar_name) or getenv(envvar_name.replace("-", "_")) or "",
end="",
)
' \
"${var_name}"
}