-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
[BUG] yarn workspaces foreach run
prefix string will mess up console, when sudo
.
#6667
Comments
I am unable to reproduce. Looks like your terminal is not correctly processing newline characters, in which case there are nothing we can do on our end. |
Not sure what happened, I was never meet this situation within I believe nothing wrong with this simple combination, may try other combination later. Current workaround is very simple. Maybe your terminal using something similar? Bug combination is Workaround combination is 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)
}
})(),
])
} |
Confirm able to always reproduce using
$ img=public.ecr.aws/docker/library/archlinux:latest@sha256:8b0a7d7e22c2e78539406a37ba2a1eb431d31981be3d76e076f517d3b62204d0
$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD":/reproduce -w /reproduce "$img"
[root@43ba36db2fc0 reproduce]# pacman -Sy --disable-sandbox && pacman --noconfirm -S sudo nodejs docker docker-buildx && corepack enable && yarn
[root@43ba36db2fc0 reproduce]# yarn build
[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: 90B done
[hello]: #1 DONE 0.7s
[hello]:
[hello]: #2 [internal] load metadata for mcr.microsoft.com/devcontainers/base:alpine-3.20
[hello]: #2 DONE 0.0s
[hello]:
[hello]: #3 [internal] load .dockerignore
[hello]: #3 transferring context:
[hello]: #3 transferring context: 2B done
[hello]: #3 DONE 0.8s
[hello]:
[hello]: #4 [1/1] FROM mcr.microsoft.com/devcontainers/base:alpine-3.20
[hello]: #4 CACHED
[hello]:
[hello]: #5 exporting to image
[hello]: #5 exporting layers done
[hello]: #5 writing image sha256:6609a4e82f8b1d391aec77dd37288540ce9437dfbdcb28bcf8a9a6bf9d89d493 0.0s done
[hello]: #5 DONE 0.2s
[hello]: Process exited (exit code 0), completed in 4s 677ms
Done in 4s 680ms |
Also able to reproduce when using |
Summary
Confirm able to always reproduce using combo
Workaround
|
yarn workspaces foreach run
prefix string mess up consoleyarn workspaces foreach run
prefix string will mess up console, when sudo
.
Figure out root cause is Reproduce repo updated. |
summaryUntil now, have not yet been confirmed as bug by nodejs and yarn. Below is summary based on my current understanding of this problem. I think
briefhttps://github.com/loynoir/reproduce-yarn-berry-6667 "scripts": {
"reproduce": "yarn workspaces foreach --all --exclude . run reproduce",
"workaround": "yarn workspaces foreach --all --exclude . run workaround",
"simulate": "yarn workspaces foreach --all --exclude . run simulate"
} "scripts": {
"reproduce": "sudo node ./simulate.mjs",
"workaround": "deno run -A ./workaround.ts",
"simulate": "node ./simulate.mjs"
}
nodeBecause
Which means
But
Which means
I think
yarnBecause
I think
denoBecause
I think
|
Self-service
Describe the bug
yarn workspaces foreach run
prefix string mess up consoleTo reproduce
https://github.com/loynoir/reproduce-yarn-berry-6667
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: