From c7f29f7adef1a245bd91520e94867e5c6eedddcc Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 7 Dec 2022 02:41:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Override=20`$HOME`=20in=20the=20?= =?UTF-8?q?container=20with=20`/root`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- twine-upload.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/twine-upload.sh b/twine-upload.sh index 98d1efe..74fe085 100755 --- a/twine-upload.sh +++ b/twine-upload.sh @@ -11,6 +11,7 @@ set -Eeuo pipefail # NOTE: These variables are needed to combat GitHub passing broken env vars # NOTE: from the runner VM host runtime. # Ref: https://github.com/pypa/gh-action-pypi-publish/issues/112 +export HOME="/root" # So that `python -m site` doesn't get confused export PATH="/usr/bin:${PATH}" # To find `id` . /etc/profile # Makes python and other executables findable export PATH="$(python -m site --user-base)/bin:${PATH}"