fix deadlock error when pipe ends while prompting password#194
fix deadlock error when pipe ends while prompting password#194tegefaulkes merged 3 commits intostagingfrom
Conversation
025c43c to
a1c2627
Compare
|
Minor logic bug. It's fixed now. Prepping for merge. |
|
This is the simplest and best solution I can think of right now. The core of the problem is that the Prompts fails to process this in two ways
Initially I tried to solve this by creating a promise to track the end of the The simplest solution is to not prompt at all when handling a pipe. The pipe still works, we just can't function interactively while doing it. I looked into using the The only other solution I can think of right now is to detect the piping and have our own stream processor to extract the provided password. Similar to https://stackoverflow.com/questions/59308117/how-to-differentiate-between-standard-inputs-via-pipe-and-via-prompt-in-nodejs |
|
I'm putting this on hold for now pending some discussion. |
|
Did you synthesize the solution from https://www.npmjs.com/package/ttys? |
|
We're going to go with the current behaviour I've implemented. Where we handle the pipe as if the user cancelled the password prompt. |
|
I had to remove the tests using |
3de3de1 to
010b3b8
Compare
|
Ready to merge. |
…ailing to get password [ci skip]
nexpect uses a pipe to function it seems. It is incompatible with the fix. It's weird that it worked before but. [ci skip]
010b3b8 to
62c43a7
Compare
Description
This PR addresses the promise deadlock error when piping into the
agent startcommand with fresh state.I've applied a fix, however some tests are failing now with new behaviour. So I'll need to look deeper into this. It may just be
pkExpectbreaking but some concurrent X tests are failing too.Issues Fixed
Tasks
stdinends while awaiting the prompt.Final checklist