Skip to content

Commit

Permalink
omicron.utils: set OMICRON_HTML in get_omicron_version
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmmacleod committed Oct 27, 2023
1 parent 62e4c52 commit 25f4126
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions omicron/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import sys
from pathlib import Path
from shutil import which
from tempfile import gettempdir

from packaging.version import Version

Expand Down Expand Up @@ -98,10 +99,10 @@ def get_omicron_version(executable=None):
executable = executable or find_omicron()
try:
return Version(
subprocess.check_output([
executable,
"version",
]).decode("utf-8").rsplit(maxsplit=1)[-1],
subprocess.check_output(
[executable, "version"],
env={"OMICRON_HTML": gettempdir()},
).decode("utf-8").rsplit(maxsplit=1)[-1],
)
except subprocess.CalledProcessError as ex:
raise RuntimeError(f"failed to determine omicron version from executable: {str(ex)}")
Expand Down

0 comments on commit 25f4126

Please sign in to comment.