Add the file errors to prevent using an invalid file path.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-09-28 21:00:17 +03:00
parent 5d56abbee9
commit 79a498022e
+6
View File
@@ -69,6 +69,12 @@
(map-has-keys? options [:message, :message-file]) (map-has-keys? options [:message, :message-file])
{:exit-message (error-msg ["You can't use message and message-file options at the same time!!!"])} {:exit-message (error-msg ["You can't use message and message-file options at the same time!!!"])}
(file/is-file-not-exists? (:message-file options))
{:exit-message (error-msg ["Please, check the path to the message file!!!"])}
(file/is-file-exists? (:output-file options))
{:exit-message (error-msg ["Please, choose another file!!! Overwriting was prevented!!!"])}
(and (map-has-keys? options [:cipher, :key]) (and (map-has-keys? options [:cipher, :key])
(or (contains? options :message) (or (contains? options :message)
(contains? options :message-file)) (contains? options :message-file))