Skip to content

Commit ff319d5

Browse files
[pacman] Correctly check dependencies
1 parent adeee89 commit ff319d5

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

pacman.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
# -*- coding: utf-8 -*-
22

3-
"""Extension for the package manager `pacman`.
3+
"""Arch Linux Package Manager (pacman) extension.
44
5-
The extension provides a way to install, remove and search for packages in the \
6-
archlinux.org database. To trigger the extension you just need to type `pacman ` \
7-
in albert.
5+
The extension provides a way to install, remove and search for packages in the archlinux.org \
6+
database. If no search query is supplied, you have the option to do a system update. \
7+
Otherwise albert will try to find for packages matching the filter. For more information about \
8+
`pacman` please have a look at: https://wiki.archlinux.org/index.php/pacman
89
9-
If no search query is supplied you have the option to do a system update. \
10-
Otherwise albert will try to search for packages with the search query within \
11-
the package name.
12-
13-
For more information about `pacman` please have a look at: \
14-
https://wiki.archlinux.org/index.php/pacman"""
10+
Synopsis: <trigger> [filter]"""
1511

1612
import re
1713
import subprocess
@@ -21,14 +17,14 @@
2117

2218
__iid__ = "PythonInterface/v0.1"
2319
__prettyname__ = "PacMan"
24-
__version__ = "1.1"
20+
__version__ = "1.2"
2521
__trigger__ = "pacman "
2622
__author__ = "Manuel Schneider, Benedict Dudel"
2723
__dependencies__ = ["pacman", "expac"]
2824

29-
30-
if which("pacman") is None:
31-
raise Exception("'pacman' is not in $PATH.")
25+
for dep in __dependencies__:
26+
if which(dep) is None:
27+
raise Exception("'%s' is not in $PATH." % dep)
3228

3329
iconPath = iconLookup("system-software-install")
3430

0 commit comments

Comments
 (0)