Skip to content

Commit c1cca16

Browse files
committed
Better locate os env
1 parent 6583faf commit c1cca16

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

myst_libre/rees/rees.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from myst_libre.tools.build_source_manager import BuildSourceManager
44
import docker
55
import subprocess
6+
import os
67

78
class REES(DockerRegistryClient,BuildSourceManager):
89
def __init__(self, rees_dict):
@@ -39,7 +40,7 @@ def check_docker_installed(self):
3940
EnvironmentError: If Docker is not installed or not found in PATH.
4041
"""
4142
try:
42-
result = subprocess.run(['docker', '--version'], capture_output=True, text=True, check=True)
43+
result = subprocess.run(['docker', '--version'], env=os.environ, capture_output=True, text=True, check=True)
4344
self.cprint(f"✓ Docker is installed: {result.stdout.strip()}",'green')
4445
except subprocess.CalledProcessError as e:
4546
raise EnvironmentError("Docker is not installed or not found in PATH. Please install Docker to proceed.") from e

myst_libre/tools/myst_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def check_node_installed(self):
4040
EnvironmentError: If Node.js is not installed or not found in PATH.
4141
"""
4242
try:
43-
result = subprocess.run(['node', '--version'], capture_output=True, text=True, check=True)
43+
result = subprocess.run(['node', '--version'],env=os.environ, capture_output=True, text=True, check=True)
4444
self.cprint(f"✓ Node.js is installed: {result.stdout.strip()}","green")
4545
except subprocess.CalledProcessError as e:
4646
raise EnvironmentError("Node.js is not installed or not found in PATH. Please install Node.js to proceed.") from e
@@ -53,7 +53,7 @@ def check_mystmd_installed(self):
5353
EnvironmentError: If MyST markdown tool is not installed or not found in PATH.
5454
"""
5555
try:
56-
result = subprocess.run([self.executable, '--version'], capture_output=True, text=True, check=True)
56+
result = subprocess.run([self.executable, '--version'],env=os.environ, capture_output=True, text=True, check=True)
5757
self.cprint(f"✓ mystmd is installed: {result.stdout.strip()}","green")
5858
except subprocess.CalledProcessError as e:
5959
raise EnvironmentError(f"{self.executable} is not installed or not found in PATH. Please install mystmd to proceed.") from e

0 commit comments

Comments
 (0)