From: rinpatch Date: Sat, 12 Dec 2020 17:37:14 +0000 (+0300) Subject: instance.gen: Warn that stripping exif requires exiftool X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=7133c0c5ea7f9966d92e53acb52429746fbe51e6;p=akkoma instance.gen: Warn that stripping exif requires exiftool And default to no if it is not installed Closes #2343 --- diff --git a/lib/mix/tasks/pleroma/instance.ex b/lib/mix/tasks/pleroma/instance.ex index a4f1c81bc..853c4eaa2 100644 --- a/lib/mix/tasks/pleroma/instance.ex +++ b/lib/mix/tasks/pleroma/instance.ex @@ -161,12 +161,21 @@ defmodule Mix.Tasks.Pleroma.Instance do ) |> Path.expand() + {strip_uploads_message, strip_uploads_default} = + if Pleroma.Utils.command_available?("exiftool") do + {"Do you want to strip location (GPS) data from uploaded images? This requires exiftool, it was detected as installed. (y/n)", + "y"} + else + {"Do you want to strip location (GPS) data from uploaded images? This requires exiftool, it was detected as not installed, please install it if you answer yes. (y/n)", + "n"} + end + strip_uploads = get_option( options, :strip_uploads, - "Do you want to strip location (GPS) data from uploaded images? (y/n)", - "y" + strip_uploads_message, + strip_uploads_default ) === "y" anonymize_uploads =