Skip to content

Commit

Permalink
Fix __dirname missing in nbb.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Oct 12, 2024
1 parent d890937 commit 2ef5ac0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sitefox/tracebacks.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
[email-address & [build-id]]
(let [sitefox-traceback-singleton (aget js/process "sitefox-traceback-handler")]
(if (nil? sitefox-traceback-singleton)
(let [log (.createStream rfs "error.log" (clj->js {:interval "7d" :path (str js/__dirname "/logs") :teeToStdout true}))
(let [log-dir (str (or js/__dirname ".") "/logs") ; (:file (meta #'f)) <- nbb
log (.createStream rfs "error.log" (clj->js {:interval "7d" :path log-dir :teeToStdout true}))
error-handler-fn (partial handle-traceback email-address log build-id)
error-fn (fn [error]
(p/do!
Expand Down

0 comments on commit 2ef5ac0

Please sign in to comment.