We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sudo
v23.7.0
No response
seems like nodejs console race condition bug when sudo
node v23.7.0
yarn 4.6.0
https://github.com/loynoir/reproduce-yarn-berry-6667
"scripts": { "reproduce": "yarn workspaces foreach --all --exclude . run reproduce",
"scripts": { "reproduce": "sudo node ./simulate.mjs",
import { readFile } from "node:fs/promises"; import { stderr, stdout } from "node:process"; /** @type {Array<{ type: "stdout" | "stderr"; value: string }>} */ const data = JSON.parse( await readFile("./simulate.json", "utf8"), ); for (const el of data) { switch (el.type) { case "stdout": stdout.write(el.value); break; case "stderr": stderr.write(el.value); break; default: throw new Error(); } }
[root@e556503f99d5 app]# yarn reproduce [hello]: Process started [hello]: #0 building with "default" instance using docker driver [hello]: [hello]: #1 [internal] load build definition from Dockerfile [hello]: #1 transferring dockerfile: [hello]: #1 transferring dockerfile: 163B done [hello]: #1 DONE 0.4s [hello]: [hello]: #2 [internal] load metadata for public.ecr.aws/docker/library/hello-world:latest@sha256:d715f14f9eca81473d9112df50457893aa4d099adeb4729f679006bf5ea12407 [hello]: #2 DONE 0.7s [hello]: [hello]: #3 [internal] load .dockerignore [hello]: #3 transferring context: [hello]: #3 transferring context: 2B done [hello]: #3 DONE 0.4s [hello]: [hello]: #4 [1/1] FROM public.ecr.aws/docker/library/hello-world:latest@sha256:d715f14f9eca81473d9112df50457893aa4d099adeb4729f679006bf5ea12407 [hello]: #4 CACHED [hello]: [hello]: #5 exporting to image [hello]: #5 exporting layers done [hello]: #5 writing image sha256:74cc54e27dc41bb10dc4b2226072d469509f2f22f1a3ce74f4a59661a1d44602 0.0s done [hello]: #5 DONE 0.2s [hello]: Process exited (exit code 0), completed in 0s 160ms Done in 0s 165ms [root@e556503f99d5 app]#
yarnpkg/berry#6667
console OK
console mess up
The text was updated successfully, but these errors were encountered:
Not sure it is a yarn berry bug, or nodejs bug + deno bug.
Verify Deno have same console mess up behavior without below workaround.
async function cp_output_workaround(cp: Deno.ChildProcess) { await Promise.all([ (async () => { for await (const el of cp.stdout) { Deno.stdout.write(el); } })(), (async () => { for await (const el of cp.stderr) { Deno.stderr.write(el); } })(), ]); }
I found it working.
But not really understand why sudo console mess up, without workaround.
Sorry, something went wrong.
No branches or pull requests
Version
v23.7.0
Platform
Subsystem
No response
What steps will reproduce the bug?
bug
seems like nodejs console race condition bug when
sudo
version
node v23.7.0
yarn 4.6.0
reproduce
https://github.com/loynoir/reproduce-yarn-berry-6667
related
yarnpkg/berry#6667
How often does it reproduce? Is there a required condition?
sudo
What is the expected behavior? Why is that the expected behavior?
console OK
What do you see instead?
console mess up
Additional information
No response
The text was updated successfully, but these errors were encountered: