Skip to content

Commit 799325a

Browse files
anmonteiroswannodette
authored andcommitted
CLJS-2328: Args are not provided to *main-cli-fn* with optimizations advanced
1 parent 5180e7e commit 799325a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/cljs/cljs/nodejscli.cljs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
; job is to make sure cljs.nodejs is loaded and that the *main-cli-fn*
1111
; is called with the script's command-line arguments.
1212
(ns cljs.nodejscli
13-
(:require [cljs.nodejs :as nodejs]))
13+
(:require [cljs.nodejs :as nodejs]
14+
[goog.object :as gobj]))
1415

1516
;; need to set js/goog.global if COMPILED
1617
(when ^boolean js/COMPILED
1718
(set! js/goog.global js/global))
1819

1920
;; Call the user's main function
2021
(when (fn? cljs.core/*main-cli-fn*)
21-
(apply cljs.core/*main-cli-fn* (drop 2 (.-argv js/process))))
22+
(apply cljs.core/*main-cli-fn* (drop 2 (gobj/get js/process "argv"))))

0 commit comments

Comments
 (0)