mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-05-29 22:18:49 +02:00
Error: Check for imagemagick
This commit is contained in:
parent
bfef5a1737
commit
89e12a61c5
6
wal.py
6
wal.py
@ -112,6 +112,12 @@ def get_image(img):
|
|||||||
"""Validate image input."""
|
"""Validate image input."""
|
||||||
image = Path(img)
|
image = Path(img)
|
||||||
|
|
||||||
|
# Check if the user has Imagemagick installed.
|
||||||
|
if not shutil.which("convert"):
|
||||||
|
print("error: imagemagick not found, exiting...")
|
||||||
|
print("error: wal requires imagemagick to function.")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
if image.is_file():
|
if image.is_file():
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user