We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f79b1c4 commit c9fe7feCopy full SHA for c9fe7fe
scripts/reuse_skip_wrapper.py
@@ -6,6 +6,7 @@
6
7
import argparse
8
import os
9
+import shutil
10
import subprocess
11
12
@@ -27,9 +28,8 @@ def skip(file: str) -> bool:
27
28
29
files = [f for f in args.files if not skip(f)]
30
- # Check if reuse is installed in ~/.local/bin otherwise try to use python -m reuse
31
- reuse_path = os.path.expanduser("~/.local/bin/reuse")
32
- if not os.path.isfile(reuse_path):
+ reuse_path = shutil.which("reuse")
+ if not reuse_path:
33
reuse_path = "python -m reuse"
34
try:
35
subprocess.run(f"{reuse_path} lint-file {' '.join(files)}", shell = True, check = True)
0 commit comments