Skip to content

Commit 53c03e3

Browse files
committed
use shutil.which in client build
1 parent a544274 commit 53c03e3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

idom/client/manage.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,15 @@ def _npm_run_build(cwd: Path) -> None:
130130

131131

132132
def _run_subprocess(args: List[str], cwd: Path) -> None:
133+
cmd, *args = args
134+
cmd = shutil.which(cmd)
133135
try:
134136
subprocess.run(
135-
args, cwd=cwd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
137+
[cmd] + args,
138+
cwd=cwd,
139+
check=True,
140+
stdout=subprocess.PIPE,
141+
stderr=subprocess.PIPE,
136142
)
137143
except subprocess.CalledProcessError as error: # pragma: no cover
138144
raise subprocess.SubprocessError(error.stderr.decode()) from error

0 commit comments

Comments
 (0)