mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 11:11:40 +02:00
♻️ Refactor error handling on exporter browser module.
This commit is contained in:
parent
bf51e3db60
commit
0be2b2791f
9 changed files with 106 additions and 64 deletions
|
@ -11,10 +11,10 @@
|
|||
["fs" :as fs]
|
||||
["os" :as os]
|
||||
["path" :as path]
|
||||
[lambdaisland.glogi :as log]
|
||||
[app.common.logging :as l]
|
||||
[promesa.core :as p]))
|
||||
|
||||
(log/set-level "app.util.shell" :trace)
|
||||
(l/set-level! :trace)
|
||||
|
||||
(defn create-tmpdir!
|
||||
[prefix]
|
||||
|
@ -47,10 +47,10 @@
|
|||
[cmd]
|
||||
(p/create
|
||||
(fn [resolve reject]
|
||||
(log/trace :fn :run-cmd :cmd cmd)
|
||||
(l/trace :fn :run-cmd :cmd cmd)
|
||||
(chp/exec cmd #js {:encoding "buffer"}
|
||||
(fn [error stdout stderr]
|
||||
;; (log/trace :fn :run-cmd :stdout stdout)
|
||||
;; (l/trace :fn :run-cmd :stdout stdout)
|
||||
(if error
|
||||
(reject error)
|
||||
(resolve stdout)))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue