summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-htgettoken/package.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/py-htgettoken/package.py b/var/spack/repos/builtin/packages/py-htgettoken/package.py
index 4ddc0c25bd..bbaeb959fa 100644
--- a/var/spack/repos/builtin/packages/py-htgettoken/package.py
+++ b/var/spack/repos/builtin/packages/py-htgettoken/package.py
@@ -33,8 +33,8 @@ class PyHtgettoken(PythonPackage):
depends_on("py-urllib3", type=("build", "run"))
def setup_run_environment(self, env):
- dir = env.get("XDG_RUNTIME_DIR") or "/tmp"
- uid = env.get("UID") or os.geteuid()
+ dir = os.environ.get("XDG_RUNTIME_DIR", "/tmp")
+ uid = os.environ.get("UID", str(os.geteuid()))
file = join_path(dir, "bt_u" + uid)
env.set("BEARER_TOKEN", file)
env.set("BEARER_TOKEN_FILE", file)