mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-07 17:00:32 +02:00
Use same Python executable for subprocesses as for all-lint.py
This commit is contained in:
@ -10,11 +10,12 @@
|
|||||||
from glob import glob
|
from glob import glob
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import run
|
from subprocess import run
|
||||||
|
from sys import executable
|
||||||
|
|
||||||
exit_code = 0
|
exit_code = 0
|
||||||
mod_path = Path(__file__).parent
|
mod_path = Path(__file__).parent
|
||||||
for lint in glob(f"{mod_path}/lint-*.py"):
|
for lint in glob(f"{mod_path}/lint-*.py"):
|
||||||
result = run([lint])
|
result = run([executable, lint])
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
print(f"^---- failure generated from {lint.split('/')[-1]}")
|
print(f"^---- failure generated from {lint.split('/')[-1]}")
|
||||||
exit_code |= result.returncode
|
exit_code |= result.returncode
|
||||||
|
Reference in New Issue
Block a user