Skip to content

Commit

Permalink
Fix wording for #7555
Browse files Browse the repository at this point in the history
  • Loading branch information
logseq-cldwalker committed Dec 19, 2022
1 parent 0a27377 commit 396c42c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/electron/electron/handler.cljs
Expand Up @@ -470,7 +470,7 @@
deferred (p/deferred)
on-exit-handler (fn [code]
(p/resolve! deferred code))
_job (shell/run-command-safety! command args on-data-handler on-exit-handler)]
_job (shell/run-command-safely! command args on-data-handler on-exit-handler)]
deferred)
(catch js/Error e
(utils/send-to-renderer window "notification"
Expand Down
6 changes: 3 additions & 3 deletions src/electron/electron/shell.cljs
Expand Up @@ -37,15 +37,15 @@
[command]
(when-not
(some->> command (.sync command-exists))
(throw (js/Error. (str "Shell: " command " not exist!")))) command)
(throw (js/Error. (str "Shell: " command " does not exist!")))) command)

(defn- ensure-command-in-allowlist
[command]
(when-not
(some->> command (contains? (get-commands-allowlist)))
(throw (js/Error. (str "Shell: " command " not be allowed!")))) command)
(throw (js/Error. (str "Shell: " command " is not allowed!")))) command)

(defn run-command-safety!
(defn run-command-safely!
[command args on-data on-exit]
(when (some-> command str string/trim string/lower-case
(ensure-command-exists)
Expand Down

0 comments on commit 396c42c

Please sign in to comment.