maralorn / nix-output-monitor

Pipe your nix-build output through the nix-output-monitor a.k.a nom to get additional information while building.
GNU Affero General Public License v3.0
841 stars 24 forks source link

pass through sudo password prompt #68

Open evils opened 1 year ago

evils commented 1 year ago

i often do sudo nixos-rebuild -I nixpkgs=/home/evils/nixpkgs switch |& nom nom used to at least pass the password prompt through for a second, but somewhere between 1.1.3.0 and 2.0.0.2 that stopped

it'd be nice if the prompt was permanently passed through so i don't have to cancel and do sudo -v to be sure sudo got my password

maralorn commented 1 year ago

Hey there,

sorry for breaking your workflow. I think this has something to do with the prompt not ending in a newline.

maralorn commented 1 year ago

Fixed, new release will come soon.

maralorn commented 1 year ago

I have the feeling that this might actually still be a problem despite my "fix". Is this problem fixed for you @evils ?

evils commented 1 year ago

hmm, i had the impression it was working on my little pcengines board but i just checked and my desktop is actually ahead, at 2.0.0.5 (vs 2.0.0.4) so it showing the prompt for a second on the board is probably due to it being significantly slower than my desktop... on my desktop it does display it, but for maybe 1 frame which could qualify as fixing the issue i described but not the ideal scenario

devhell commented 1 year ago

If I hadn't found this issue, I wouldn't know you attempted a fix. :grin: I've been typing my password in good faith, like @evils, and did wonder if there's something planned to address this UX-wise.

maralorn commented 1 year ago

I am currently on a break from working on nom but it will be over in a few months. Then I will look into this again.

johnhamelink commented 1 year ago

I've found that I can see the sudo prompt if I hit enter so that the prompt is re-rendered after failing validation.

devhell commented 11 months ago

I've found that I can see the sudo prompt if I hit enter so that the prompt is re-rendered after failing validation.

Interesting, I did the same thing, and the prompt appeared for a second and then was overwritten by the timer again. Maybe it's terminal dependent somehow?