From bbd0c3b09344981e7836c9a9d1469a7ae17f7681 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 26 Oct 2024 20:55:08 +0200 Subject: [PATCH] CLI: shutil.which("npm.exe") --- responder/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/responder/cli.py b/responder/cli.py index 263b341c..e6cac73c 100644 --- a/responder/cli.py +++ b/responder/cli.py @@ -29,6 +29,7 @@ """ import logging +import shutil import subprocess import typing as t @@ -55,7 +56,7 @@ def cli() -> None: run: bool = args["run"] if build: - subprocess.check_call(["npm.exe", "run", "build"], cwd=target) # noqa: S603, S607 + subprocess.check_call([shutil.which("npm.exe"), "run", "build"], cwd=target) # noqa: S603, S607 if run: # Maximum request limit. Terminating afterward. Suitable for software testing.