Skip to content

Commit fb7e29e

Browse files
committed
Update setup_build.jl
1 parent 9a4aaeb commit fb7e29e

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/setup_build.jl

+7-13
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,21 @@ end
2929

3030
const node_build_lock = ReentrantLock()
3131

32-
ci() = get(ENV, "CI", "neetjes") != "neetjes"
33-
3432
function build_node(dir)
3533
lock(node_build_lock) do
36-
@info "PlutoPDF: Running npm install in scratch space..."
37-
38-
if dir !== dirname(node_root_files[1])
34+
npm_cache_dir = @get_scratch!("npm_cache")
35+
cmd = addenv(npm_cmd(), "NPM_CONFIG_CACHE" => npm_cache_dir)
36+
37+
@info "PlutoPDF: Running npm install in scratch space..." cdm read(`$(cmd) --version`, String)
38+
39+
if dir != dirname(node_root_files[1])
3940
for f in node_root_files
4041
readwrite(f, joinpath(dir, basename(f)))
4142
end
4243
end
4344

44-
npm_cache_dir = @get_scratch!("npm_cache")
45-
46-
cmd = addenv(npm_cmd(), "NPM_CONFIG_CACHE" => npm_cache_dir)
47-
48-
@debug "huh" cmd
49-
5045
cd(dir) do
51-
run(`$(cmd) --version`)
52-
run(ci() ? `$(cmd) install --verbose` : `$(cmd) install --audit-level=none --no-fund --no-audit`)
46+
run(`$(cmd) install --audit-level=none --no-fund --no-audit`)
5347
end
5448

5549
@info "PlutoPDF: Finished npm install."

0 commit comments

Comments
 (0)