Skip to content

Commit 8bc9b98

Browse files
mfikesdnolen
authored andcommitted
CLJS-2721: test-cljs-2580 failing in windows CI
1 parent c21f17f commit 8bc9b98

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/cljs/cljs/module_deps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ md.on('end', function () {
185185
let pkgJson = pkgJsons[i];
186186
const candidates = /\.js(on)?$/.test(pkgJson.mainEntry)
187187
? [pkgJson.mainEntry]
188-
: [pkgJson.mainEntry, pkgJson.mainEntry + '.js', pkgJson.mainEntry + '/index.js', pkgJson.mainEntry + '.json'];
188+
: [pkgJson.mainEntry, pkgJson.mainEntry + '.js', pkgJson.mainEntry + 'FILE_SEPARATOR' + 'index.js', pkgJson.mainEntry + '.json'];
189189

190190
for (let j = 0; j < candidates.length; j++) {
191191
const candidate = candidates[j];

src/main/clojure/cljs/closure.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,10 +2357,12 @@
23572357
(let [main-entries (str "[" (->> (package-json-entries opts)
23582358
(map #(str "'" % "'"))
23592359
(string/join ",")) "]")
2360+
escape-backslashes #(string/replace % "\\" "\\\\")
23602361
code (-> (slurp (io/resource "cljs/module_deps.js"))
2361-
(string/replace "JS_FILE" (string/replace file "\\" "\\\\"))
2362+
(string/replace "JS_FILE" (escape-backslashes file))
23622363
(string/replace "CLJS_TARGET" (str "" (when target (name target))))
2363-
(string/replace "MAIN_ENTRIES" main-entries))
2364+
(string/replace "MAIN_ENTRIES" main-entries)
2365+
(string/replace "FILE_SEPARATOR" (escape-backslashes File/separator)))
23642366
proc (-> (ProcessBuilder. ["node" "--eval" code])
23652367
.start)
23662368
is (.getInputStream proc)

0 commit comments

Comments
 (0)