Open ermik opened 6 years ago
I think npm runs the install scripts serially, and the user can interact with the script.
I don't think yarn exposes stdin to these scripts to allow them to be "interactive". I'm pretty sure we also run multiple in parallel to speed things up, so I doubt we can easily feed keyboard input to the running scripts.
@yarnpkg/core this one seems like it might be tricky. Anyone have any ideas or want to tackle this?
edit
Adding yarn output for reference.
~/Projects/yarn-test π yarn add @squarespace/server
yarn add v1.5.1
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π Building fresh packages...
[-/3] β‘ waiting...
[-/3] β waiting...
[-/3] β’ waiting...
[-/3] β waiting...
[-/3] β waiting...
[-/3] β’ waiting...
[2/3] β’ uws
[3/3] β’ @squarespace/server: To read the file, press Enter. :
[-/3] β’ waiting...
You can see the script is waiting for input from the user (and is running uws
's script at the same time).
Don't know how either work, but one can assume the script execution like this would be blocking, such as while other tasks may continue in the background (resolving dependencies) βΒ the process should reach a point where yarn will pause and wait for the blocking script to successfully exit.
Do you want to request a feature or report a bug?
It's a bug.
What is the current behavior? Attempting to install a package with an install checkpoint script (accepting terms and conditions) halts
yarn install
execution.Package on npm:
@squarespace/server
Succeeds with
npm install
: yes Tested: yes, with a single package in package.json this still failsIf the current behavior is a bug, please provide the steps to reproduce.
"@squarespace/server": "^1.1.2"
What is the expected behavior? halt install and wait for the checkpoint script to successfully execute (exit)
Please mention your node.js, yarn and operating system version. node 9.3.0 yarn 1.5.1 osx 10.13.3