diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2021-01-18 11:56:40 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2021-01-18 11:56:40 +0300 |
commit | 2289a1d58777b8ed129e322c3ce4119bc129366c (patch) | |
tree | 693af643bfd94af28c29ec519ef8df0f208d7424 /lib/mix/tasks/pleroma/instance.ex | |
parent | dbaa15232bfe4c2bc3e2b1a17cfc7503e7036d77 (diff) | |
parent | 732cc0ce46e8044909dd5205858c43f75fe3e937 (diff) | |
download | pleroma-2289a1d58777b8ed129e322c3ce4119bc129366c.tar.gz |
Merge branch 'develop' into refactor/uploads
Diffstat (limited to 'lib/mix/tasks/pleroma/instance.ex')
-rw-r--r-- | lib/mix/tasks/pleroma/instance.ex | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/mix/tasks/pleroma/instance.ex b/lib/mix/tasks/pleroma/instance.ex index ac8688424..f272fdb7f 100644 --- a/lib/mix/tasks/pleroma/instance.ex +++ b/lib/mix/tasks/pleroma/instance.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.Instance do @@ -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 = @@ -253,7 +262,7 @@ defmodule Mix.Tasks.Pleroma.Instance do else shell_error( "The task would have overwritten the following files:\n" <> - (Enum.map(paths, &"- #{&1}\n") |> Enum.join("")) <> + (Enum.map(will_overwrite, &"- #{&1}\n") |> Enum.join("")) <> "Rerun with `--force` to overwrite them." ) end |