Skip to content

Commit dcbf37c

Browse files
committed
Fixes broken CLI permissions script
1 parent 03ee679 commit dcbf37c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"baseline-browser-mapping": "./dist/cli.js"
2727
},
2828
"scripts": {
29-
"fix-cli-permissions": "output=$(npx baseline-browser-mapping 2>&1); [[ \"$output\" =~ sh:\\ ([^:]+):\\ Permission\\ denied ]] && path=\"${BASH_REMATCH[1]}\" && echo \"Permission denied for: $path\" && echo \"Removing $path ...\" && rm -rf \"$path\" || echo \"$output\"",
29+
"fix-cli-permissions": "output=$(npx baseline-browser-mapping 2>&1); path=$(printf '%s\n' \"$output\" | sed -n 's/^sh: \\(.*\\): Permission denied$/\\1/p'); if [ -n \"$path\" ]; then echo \"Permission denied for: $path\"; echo \"Removing $path ...\"; rm -rf \"$path\"; else echo \"$output\"; fi",
3030
"test:format": "npx prettier --check .",
3131
"test:lint": "npx eslint .",
3232
"test:bcb": "mkdir test-bcb && cd test-bcb && npm init -y && npm i ../../baseline-browser-mapping browserslist browserslist-config-baseline &&jq '. += {\"browserslist\":[\"extends browserslist-config-baseline\"]}' package.json >p && mv p package.json && npx browserslist && cd ../ && rm -rf test-bcb",

0 commit comments

Comments
 (0)