Skip to content

Commit 5cd75b2

Browse files
committed
twine-upload: reflow
Signed-off-by: William Woodruff <[email protected]>
1 parent c608442 commit 5cd75b2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

twine-upload.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ export PATH="/usr/bin:${PATH}" # To find `id`
1717
export PATH="$(python -m site --user-base)/bin:${PATH}"
1818
export PYTHONPATH="$(python -m site --user-site):${PYTHONPATH}"
1919

20-
if [[ -z "${INPUT_PASSWORD}" ]] ; then
21-
# No password supplied by the user implies that we're in the OIDC flow;
22-
# retrieve the OIDC credential and exchange it for a PyPI API token.
23-
echo "::notice::in OIDC flow"
24-
INPUT_PASSWORD=$(python /app/oidc-exchange.py)
25-
fi
26-
2720
function get-normalized-input() {
2821
local var_name=${1}
2922
python -c \
@@ -46,6 +39,12 @@ INPUT_VERIFY_METADATA="$(get-normalized-input 'verify-metadata')"
4639
INPUT_SKIP_EXISTING="$(get-normalized-input 'skip-existing')"
4740
INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')"
4841

42+
if [[ -z "${INPUT_PASSWORD}" ]] ; then
43+
# No password supplied by the user implies that we're in the OIDC flow;
44+
# retrieve the OIDC credential and exchange it for a PyPI API token.
45+
echo "::notice::in OIDC flow"
46+
INPUT_PASSWORD=$(python /app/oidc-exchange.py)
47+
fi
4948

5049
if [[
5150
"$INPUT_USER" == "__token__" &&

0 commit comments

Comments
 (0)