Skip to content

Commit

Permalink
Fix quotes in kbn-i18n build scripts (#26120)
Browse files Browse the repository at this point in the history
**Bug**
`packages/kbn-i18n/package.json`:
```
...
scripts: {
  "kbn:bootstrap": "run-p 'build:babel:** --quiet' build:tsc",
  "kbn:watch": "run-p 'build:** --watch'",
},
...
```
These commands throw errors on Windows because of wrong command line arguments parsing (`'build:babel:**`, `--quiet'` and `build:tsc`):
```
@kbn/i18n: $ run-p 'build:babel:** --quiet' build:tsc
× @kbn/i18n: ERROR: Invalid Option: --quiet'
```
So `yarn kbn bootstrap` fails on Windows

**Fix**
Use cross-platform escaped double quotes instead of single quotes:
```
...
scripts: {
  "kbn:bootstrap": "run-p \"build:babel:** --quiet\" build:tsc",
  "kbn:watch": "run-p \"build:** --watch\"",
},
...
```
  • Loading branch information
LeanidShutau authored and Spencer committed Nov 23, 2018
1 parent b0a107f commit 56e27e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/kbn-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"private": true,
"scripts": {
"build": "run-p build:**",
"kbn:bootstrap": "run-p 'build:babel:** --quiet' build:tsc",
"kbn:watch": "run-p 'build:** --watch'",

"kbn:bootstrap": "run-p \"build:babel:** --quiet\" build:tsc",
"kbn:watch": "run-p \"build:** --watch\"",
"build:tsc": "tsc --emitDeclarationOnly",
"build:babel:web": "cross-env BABEL_ENV=web babel src --config-file ./babel.config.js --out-dir target/web --extensions \".ts,.js,.tsx\"",
"build:babel:node": "cross-env BABEL_ENV=node babel src --config-file ./babel.config.js --out-dir target/node --extensions \".ts,.js,.tsx\""
Expand Down

0 comments on commit 56e27e6

Please sign in to comment.