mirror of
https://gitcode.com/gh_mirrors/gh/gh-action-pypi-publish.git
synced 2026-07-02 10:25:13 +00:00
🐛 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:
+4
-1
@@ -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}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user