diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-04-10 00:42:01 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2023-04-10 00:42:01 +0200 |
commit | 6f73cd875df1f84afb3dad9f7980ffb80713dc4a (patch) | |
tree | 8be91f46b9b27eb12d2dd82957a52593c69c64ba | |
parent | 583198f7c59d4819cfc1e9c7f7b2967a2601625b (diff) | |
download | setuptools-scm-6f73cd875df1f84afb3dad9f7980ffb80713dc4a.tar.gz |
switch command check from help to version
this reduces excess logs
-rw-r--r-- | src/setuptools_scm/_run_cmd.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/setuptools_scm/_run_cmd.py b/src/setuptools_scm/_run_cmd.py index e40589f..b1e5f1a 100644 --- a/src/setuptools_scm/_run_cmd.py +++ b/src/setuptools_scm/_run_cmd.py @@ -170,7 +170,9 @@ def _unsafe_quote_for_display(item: _t.PathT) -> str: return text if all(c not in text for c in " {[:") else f'"{text}"' -def has_command(name: str, args: Sequence[str] = ["help"], warn: bool = True) -> bool: +def has_command( + name: str, args: Sequence[str] = ["version"], warn: bool = True +) -> bool: try: p = run([name, *args], cwd=".", timeout=5) except OSError as e: |