Skip to content

Commit c7f29f7

Browse files
committed
🐛 Override $HOME in the container with /root
This is necessary to let `python -m site` locate the real install directories. This fixes #115 — the bug caused by GitHub passing the value of `$HOME` from the host system that does not match the container's expectations.
1 parent 644926c commit c7f29f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

twine-upload.sh

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set -Eeuo pipefail
1111
# NOTE: These variables are needed to combat GitHub passing broken env vars
1212
# NOTE: from the runner VM host runtime.
1313
# Ref: https://github.com/pypa/gh-action-pypi-publish/issues/112
14+
export HOME="/root" # So that `python -m site` doesn't get confused
1415
export PATH="/usr/bin:${PATH}" # To find `id`
1516
. /etc/profile # Makes python and other executables findable
1617
export PATH="$(python -m site --user-base)/bin:${PATH}"

0 commit comments

Comments
 (0)