Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/dotenv/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ def run_command(command: List[str], env: Dict[str, str]) -> None:
# (https://docs.python.org/3/library/subprocess.html#popen-constructor).
executable = shutil.which(command[0], path=cmd_env.get("PATH"))
try:
if executable is None and "PATH" in cmd_env:
raise FileNotFoundError
# `execvpe` on Windows returns control immediately.
p = Popen(
command,
Expand All @@ -262,3 +264,5 @@ def run_command(command: List[str], env: Dict[str, str]) -> None:
except FileNotFoundError:
print(f"Command not found: {command[0]}", file=sys.stderr)
sys.exit(1)
# Re-test trigger for diff-only scoping verification
# Live verification trigger for zero-findings attempts metadata