From c159c9954c423621ecdd07b2d26e263439bc2f16 Mon Sep 17 00:00:00 2001 From: Martin von Gagern Date: Sun, 5 Mar 2023 13:30:20 +0000 Subject: [PATCH] Quote watch argument I tried following the README: https://github.com/jupyter-widgets/widget-ts-cookiecutter/blob/94f9d384331150655c18a08d94307280c32adedd/README.md?plain=1#L94-L95 The `yarn run watch` failed for me, using node v16.17.1 and yarn 3.4.1: > No matches found: "watch:*" It works if I run `node_modules/.bin/npm-run-all -p 'watch:*'` in shell. It also works if I quote the argument. Looks to me like something is trying to expand that glob before invoking the binary. `strace` shows that the command doesn't get passed to `sh -c` as a whole. And `npm-run-all` isn't even executed so the error message is not coming from it. On the plus side, the fact that apparently these commands get executed by code inside node means portability should be no concern, and if single quotes work for me they hopefully work for everyone. --- {{cookiecutter.github_project_name}}/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.github_project_name}}/package.json b/{{cookiecutter.github_project_name}}/package.json index e0053c7..1f83d7a 100644 --- a/{{cookiecutter.github_project_name}}/package.json +++ b/{{cookiecutter.github_project_name}}/package.json @@ -43,7 +43,7 @@ "lint:check": "eslint . --ext .ts,.tsx", "prepack": "yarn run build:lib", "test": "jest", - "watch": "npm-run-all -p watch:*", + "watch": "npm-run-all -p 'watch:*'", "watch:lib": "tsc -w", "watch:nbextension": "webpack --watch --mode=development", "watch:labextension": "jupyter labextension watch ."