Skip to content

Commit 22b4d1f

Browse files
committed
🐛 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.
1 parent 7104b6e commit 22b4d1f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ inputs:
2323
packages-dir: # Canonical alias for `packages_dir`
2424
description: The target directory for distribution
2525
required: false
26-
default: dist
26+
# default: dist # TODO: uncomment once alias removed
2727
packages_dir: # DEPRECATED ALIAS; TODO: Remove in v3+
2828
description: >-
2929
[DEPRECATED]
@@ -36,7 +36,7 @@ inputs:
3636
verify-metadata: # Canonical alias for `verify_metadata`
3737
description: Check metadata before uploading
3838
required: false
39-
default: 'true'
39+
# default: 'true' # TODO: uncomment once alias removed
4040
verify_metadata: # DEPRECATED ALIAS; TODO: Remove in v3+
4141
description: >-
4242
[DEPRECATED]
@@ -51,7 +51,7 @@ inputs:
5151
Do not fail if a Python package distribution
5252
exists in the target package index
5353
required: false
54-
default: 'false'
54+
# default: 'false' # TODO: uncomment once alias removed
5555
skip_existing: # DEPRECATED ALIAS; TODO: Remove in v3+
5656
description: >-
5757
[DEPRECATED]
@@ -69,7 +69,7 @@ inputs:
6969
print-hash: # Canonical alias for `print_hash`
7070
description: Show hash values of files to be uploaded
7171
required: false
72-
default: 'false'
72+
# default: 'false' # TODO: uncomment once alias removed
7373
print_hash: # DEPRECATED ALIAS; TODO: Remove in v3+
7474
description: >-
7575
[DEPRECATED]

twine-upload.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ function get-normalized-input() {
2525
from os import getenv
2626
from sys import argv
2727
envvar_name = f"INPUT_{argv[1].upper()}"
28-
print(getenv(envvar_name, getenv(envvar_name.replace("-", "_"), "")), end="")
28+
print(
29+
getenv(envvar_name) or getenv(envvar_name.replace("-", "_")) or "",
30+
end="",
31+
)
2932
' \
3033
"${var_name}"
3134
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy