From 0bfe9c9a648c896a7b5ab7e2c48c9ece2f29389e Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 13 Jan 2022 16:27:35 +1100 Subject: [PATCH] Do not run command on js-waku lib when running examples scripts This was happening when `d=./examples/README.md`. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5686982d5d..9e9495390e 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "pretest": "run-s pretest:*", "pretest:1-init-git-submodules": "[ -f './nim-waku/build/wakunode2' ] || git submodule update --init --recursive", "pretest:2-build-nim-waku": "[ -f './nim-waku/build/wakunode2' ] || run-s nim-waku:build", - "examples:pretest": "for d in examples/*; do (cd $d; npm install); done", + "examples:pretest": "for d in examples/*/; do (cd $d && npm install); done", "nim-waku:build": "(cd nim-waku; NIMFLAGS=\"-d:chronicles_colors=off -d:chronicles_sinks=textlines -d:chronicles_log_level=TRACE\" make -j$(nproc --all 2>/dev/null || echo 2) wakunode2)", "nim-waku:force-build": "(cd nim-waku && rm -rf ./build/ ./vendor && make -j$(nproc --all 2>/dev/null || echo 2) update) && run-s nim-waku:build", "test": "run-s build test:*", @@ -39,7 +39,7 @@ "test:spelling": "cspell \"{README.md,.github/*.md,guides/*.md,src/**/*.ts}\"", "test:unit": "nyc --silent mocha", "test:karma": "karma start", - "examples:test": "run-s examples:pretest; for d in examples/*; do (cd $d; npm test;); done", + "examples:test": "run-s examples:pretest; for d in examples/*/; do (cd $d && npm test;); done", "proto": "run-s proto:*", "proto:lint": "buf lint", "proto:build": "buf generate",