From 2c8fc9789f236f14b37c9f0dfd1ad260cf71feb3 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 7 Mar 2020 14:50:16 -0800 Subject: [PATCH] Added check for exiftool in path --- osxphotos/__main__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/osxphotos/__main__.py b/osxphotos/__main__.py index 544b77e4..686f9cd7 100644 --- a/osxphotos/__main__.py +++ b/osxphotos/__main__.py @@ -14,6 +14,7 @@ import osxphotos from ._constants import _EXIF_TOOL_URL, _PHOTOS_5_VERSION from ._version import __version__ from .utils import create_path_by_date, _copy_file +from .exiftool import get_exiftool_path def get_photos_db(*db_options): @@ -741,6 +742,18 @@ def export( click.echo(cli.commands["export"].get_help(ctx), err=True) return + # verify exiftool installed an in path + if exiftool: + try: + _ = get_exiftool_path() + except FileNotFoundError: + click.echo( + "Could not find exiftool. Please download and install" + " from https://exiftool.org/", + err=True, + ) + ctx.exit(2) + isphoto = ismovie = True # default searches for everything if only_movies: isphoto = False