-
Notifications
You must be signed in to change notification settings - Fork 366
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
NpmToolResolver can hang waiting for input #1353
Comments
People can manually pass |
Hi @matkoch , I don't see how people can manually pass Looking at the code in Nuke.Tooling/NpmToolPathResolver.cs it doesn't seem to accept any options or switches to let people control it, It also explicitly hides its output with If I'm missing something please let me know how I can pass |
Hey @matkoch thanks for re-opening this for another look, and sorry if my initial issue description wasn't clear. Are you waiting on anything from me here? I'm happy to write up a PR if that's useful, or provide any other info to help test this out. Cheers |
Would it make sense to install PS: your initial message was fine but I only skimmed through it and assumed something different. my fault. |
It might make sense to work with a timeout on the |
I'm not sure sorry. It seems like installing it explicitly would be nice, if this is practical. I see that A timeout seems like it could work too. In CI case where it does auto-install the package, this could take an arbitrary amount of time to download+install, although the The timeout option does seem like the simplest fix for this admittedly obscure case. I did take a quick look at passing through
The mentioned logfile is no clearer either. And considering passing |
Usage Information
Nuke 8.0.0, .NET 8, Windows 11
Description
The NpmToolPathResolver calls
npx which
to locate the npm package. However, in some environments, npx will interactively prompt the user to confirm thewhich
package installation. Ifwhich
isn't already installed, the tool hangs as it waits for confirmation.Npm Exec describes this behaviour (and why it only happens in some environments):
Reproduction Steps
I have a generated task definition that generates a task class:
And in my build script I am executing this:
Running this build, the build hangs at the 'RunCSpell' step
Expected Behavior
The build should not hang
Actual Behavior
The build hangs at the 'RunCSpell' step. Looking in the Windows task manager I can see:
Manually running
npx which cspell
, I get output like:Npx then sits indefinitely, waiting for user input.
Regression?
No response
Known Workarounds
You can manually run the command once, which adds
which
to the npx cache and avoids the hidden input prompt.For a code fix, the
NpmToolPathResolver
should explicitly pass through--yes
to avoid interactive input prompts during build.Could you help with a pull-request?
Yes
The text was updated successfully, but these errors were encountered: