Skip to content

Commit 4f1ed79

Browse files
committed
fix has_pacfiles
1 parent 82cab9d commit 4f1ed79

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lilac2/tools.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ def get_avail_memory() -> int:
5656
def has_pacfiles() -> bool:
5757
global _HAS_PACFILES
5858
if _HAS_PACFILES is None:
59-
cmd = subprocess.run(['pacfiles', '--help'], stdout=subprocess.DEVNULL)
60-
_HAS_PACFILES = cmd.returncode == 0
59+
try:
60+
cmd = subprocess.run(['pacfiles', '--help'], stdout=subprocess.DEVNULL)
61+
_HAS_PACFILES = cmd.returncode == 0
62+
except FileNotFoundError:
63+
_HAS_PACFILES = False
6164
return _HAS_PACFILES
6265

6366
if __name__ == '__main__':

0 commit comments

Comments
 (0)