-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't workingreproducibleThis issue can be successfully reproducedThis issue can be successfully reproducedshellThis issue is about @yarnpkg/shellThis issue is about @yarnpkg/shell
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
See repro. Will throw:
$ yarn prettier:watch
Syntax Error: Expected any character but end of input found (line 1, column 81).
at zM (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:158:2926)
at mke (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:158:19836)
at Aw (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:383:10983)
at Fw (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:407:1897)
at h (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:425:2692)
at /home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:425:2876
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Wt.mktempPromise (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:317:62926)
at async Object.Uw (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:425:2498)
at async LC.execute (/home/ceefour/project/tmra/tmra-next/.yarn/releases/yarn-3.1.1.cjs:561:2054)
The use case is something like this: (which works with npm run prettier:watch
)
"prettier:watch": "onchange '**/*.{js,jsx,ts,tsx}' -- prettier --write --ignore-unknown {{changed}}",
The workaround as of yarn 3.1.1 is to use:
"prettier:watch": "onchange '**/*.{js,jsx,ts,tsx}' -- prettier --write --ignore-unknown \\{\\{changed\\}\\}",
To reproduce
await packageJsonAndInstall({
scripts: {hello: 'echo {{hello}}'},
});
await expect(yarn('hello')).resolves.not.toThrow(`Syntax Error`);
Environment
System:
OS: Linux 5.8 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Binaries:
Node: 16.13.1 - /tmp/xfs-bf325123/node
Yarn: 3.1.1 - /tmp/xfs-bf325123/yarn
npm: 6.14.15 - /usr/bin/npm
npmPackages:
jest: ^26.6.3 => 26.6.3
Additional context
No response
maranomynet, shaulgo, scowalt, phantomxc, TheTedAdams and 9 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingreproducibleThis issue can be successfully reproducedThis issue can be successfully reproducedshellThis issue is about @yarnpkg/shellThis issue is about @yarnpkg/shell