-
Notifications
You must be signed in to change notification settings - Fork 2.7k
After upgrading yarn on Windows, bash scripts won't run without hitting Enter #3540
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
Comments
I went back and installed old versions of yarn, upgrading incrementally, until I hit the problem. Version 0.24.3 worked fine, but 0.24.4 has the issue. As mentioned in the original post, 0.24.6 has the issue too. I tried installing the release candidate (0.25.3) and it suffers from the same issue as well. |
I think I spoke too quickly; 0.24.1 has this issue too. The problem seems to be a bit non-deterministic, so it can be tricky to tell if the installed yarn is affected. I can't test 0.24.0 (there's no MSI file). Version 0.23.4 seems to be the last good version; I've run all my bash scripts multiple times and everything works fine. If I upgrade from this to 0.24.1 and try running my tests, something will hang until I press Enter. |
I can confirm this as well on Windows. |
Can also confirm this issue. Scripts do not execute after |
I have the same issue, 0.24.6, running from powershell or cmd. |
Still an issue in 1.0.2. |
I tried this on Windows 10 via cmd and wasn't able to replicate. That said I'm using WSL instead of Git bash so may be this is a problem with Git Bash? |
I'm not sure who's at fault, but I do know for sure that the problem was introduced in yarn after version 0.23.4. I've downgraded to that version and I can run my scripts again without any issues. For reference, I'm running git 2.13.0 on Windows 10. |
The only patch I've found that has the potential to affect Would you like to try reverting this, getting a build and see if that's the cause? |
It's also possible that a commit between 0.24.0 and 0.24.1 is the culprit. I can't find an MSI for 0.24.0 so I haven't been able to test that version. |
That one is not possible: v0.24.0...v0.24.1 I think something went wrong when publishing 0.24.0 so they just bumped the version. Anyways, you can clone the repo, do |
I'm still seeing the issue even after reverting that commit. |
That's quite weird because there's nothing else touching the script running code between 0.23.4 and 0.24.1: v0.23.4...v0.24.1 Are you absolutely sure this never happens on 0.23.1 and this is not a problem with your specific configuration or system? Are you able to reproduce this on a different system? |
The only thing changing on my system is the yarn version and I can repro the results 100% reliably: 0.23.4 and earlier is fine, but anything after that has the issue. I don't think it's specific to me as others have reported the same issue in this thread. Unfortunately, I don't have access to another system right now. |
FYI, there were some interesting comments today on another thread I'm watching that also involves yarn, Windows, and winpty: #2591 (comment) Maybe that could be helpful for this discussion too? |
OMG, the answer was right in front of my face the whole time. So dumb. :-/ The problem is indeed with the commit I posted above. Previous to that change, I can verify that after adding Leaving this issue open so the maintainers can decide if they want to switch around the logic to use |
I think this is addressed by #4577 so closing. |
I upgraded from 0.23.3 to 0.24.6 today on my Windows 10 laptop and I'm seeing a problem whenever I run a bash script through yarn. I have several tasks defined in my package.json that look like this:
Now when I execute
yarn run lint
, the system hangs at this point:Normally this script finishes in a few moments, but I noticed after the upgrade today that it was stuck after a minute. I checked Task Manager and nothing was happening. In the shell, I hit Enter and suddenly Node.js came to life in Task Manager and the script finished within a few moments.
This problem isn't happening with all of my shell script tasks, but it's happening with the most important ones.
The text was updated successfully, but these errors were encountered: