Open ceefour opened 2 years ago
Hi! 👋
This issue looks stale, and doesn't feature the reproducible
label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).
Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃
If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded
label. Thanks for helping us triaging our repository! 🌟
This issue reproduces on master:
Error: expect(received).resolves.not.toThrow()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js hello
Syntax Error: Expected any character but end of input found (line 1, column 15).
at peg$buildStructuredError (/github/workspace/packages/yarnpkg-parsers/sources/grammars/shell.js:457:12)
at peg$parse (/github/workspace/packages/yarnpkg-parsers/sources/grammars/shell.js:3593:11)
at parseShell (/github/workspace/packages/yarnpkg-parsers/sources/shell.ts:5:12)
at execute (/github/workspace/packages/yarnpkg-shell/sources/index.ts:1026:15)
at executor (/github/workspace/packages/yarnpkg-core/sources/scriptUtils.ts:420:20)
at /github/workspace/packages/yarnpkg-core/sources/scriptUtils.ts:429:18
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at NodeFS.mktempPromise (/github/workspace/packages/yarnpkg-fslib/sources/xfs.ts:111:18)
at Object.executePackageScript (/github/workspace/packages/yarnpkg-core/sources/scriptUtils.ts:412:10)
at RunCommand.execute (/github/workspace/packages/plugin-essentials/sources/commands/run.ts:79:14)
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0c0da74930.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:6:7)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:57:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:18:16)
at async executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:25:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:26:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
This bug is also biting me pretty hard.
For me, this line triggers it:
{
"scripts": {
"lint": "eslint '{*.js,*.ts,src/**/*.ts*'}"
}
}
the version installed by yarn set version from sources --no-minify
seems to be unaffected, so maybe it got fixed between https://github.com/yarnpkg/berry/compare/%40yarnpkg/cli/3.3.0...f9e08385568e767e00b65e44dc9f5fc166e5b02a?
Maybe fixed by this? https://github.com/yarnpkg/berry/pull/4288
We are still having this issue using version 3.4.1. It's particularly painful with our turborepo scripts which use { and } to support their filtering. See https://turbo.build/repo/docs/core-concepts/monorepos/filtering for more examples. Anything I can do to help move this forward? Happy to be a guineapig.
Confirmed this issue still exists in 3.5.
Still exists at 3.5.1 trying to use env var ${CONSOLE_PORT:=3000}
I'm having the same issue when trying to access env vars:
"start": "next start -p ${PORT:=3000}",
I still see this problem to this day, in version 3.6.1.
@arcanis the PR #4288 shouldn't I have fixed that?
Still the case for yarn 4.0.2
It is not possible to write script such
"test": "pwsh -Command { Get-ChildItem -Exclude 'node_modules' -Dir }"
Self-service
Describe the bug
See repro. Will throw:
The use case is something like this: (which works with
npm run prettier:watch
)The workaround as of yarn 3.1.1 is to use:
To reproduce
Environment
Additional context
No response