Use same Python executable for subprocesses as for all-lint.py

This commit is contained in:
Kristaps Kaupe 2023-01-03 23:23:07 +02:00
parent f301bf52ab
commit f6eadaa413
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D

View File

@ -10,11 +10,12 @@
from glob import glob
from pathlib import Path
from subprocess import run
from sys import executable
exit_code = 0
mod_path = Path(__file__).parent
for lint in glob(f"{mod_path}/lint-*.py"):
result = run([lint])
result = run([executable, lint])
if result.returncode != 0:
print(f"^---- failure generated from {lint.split('/')[-1]}")
exit_code |= result.returncode