You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for catching that. Obviously we have a gap in our unit tests since they should have caught the change. Can you share the code that brought the problem to light so we ensure our unit tests cover that case?
So it was "fixed" by a17b9fd which added the missing dollar-sign. Then that was reverted (to the broken statement above) by 5043b9d when @faho realized the correction causes psub to use a fifo by default and fifo's don't actually work properly in this context. The right thing to do is to explicitly make using a file the default and provide an option for forcing the use of a fifo.
Hmm, I'm not sure it would lend itself to a unit test. In my case, I'm using psub with less, and only noticed because less won't open a fifo by default. You may need to find some other command that opens a file but won't work with a fifo for the unit test.
This is, (stripped down), the command:
less (fish_indent --ansi<$__fish_datadir/functions/psub.fish |psub)
This has less giving the error /var/folders/ky/_d4dmww16sn7pf37y99ckmz00000gn/T//.psub.ZL6VVZtAYS/psub.fifo is not a regular file (use -f to see it) (which, if I give less the -f argument, it does open). It also leaves a cat command sitting around in the background doing nothing (from psub).
And yep, that's why I referenced that commit. I went looking for why it changed and came across those in the history.
Activity
krader1961 commentedon Jul 17, 2017
Thanks for catching that. Obviously we have a gap in our unit tests since they should have caught the change. Can you share the code that brought the problem to light so we ensure our unit tests cover that case?
krader1961 commentedon Jul 17, 2017
FFS! The code "worked" before my argparse change because it was broken. See if you can spot the typo in one of the statements I changed from:
to
Those two statements should be equivalent but they're not because the original code was broken.
krader1961 commentedon Jul 17, 2017
So it was "fixed" by a17b9fd which added the missing dollar-sign. Then that was reverted (to the broken statement above) by 5043b9d when @faho realized the correction causes psub to use a fifo by default and fifo's don't actually work properly in this context. The right thing to do is to explicitly make using a file the default and provide an option for forcing the use of a fifo.
Darkshadow2 commentedon Jul 17, 2017
Hmm, I'm not sure it would lend itself to a unit test. In my case, I'm using
psubwithless, and only noticed becauselesswon't open a fifo by default. You may need to find some other command that opens a file but won't work with a fifo for the unit test.This is, (stripped down), the command:
This has less giving the error
/var/folders/ky/_d4dmww16sn7pf37y99ckmz00000gn/T//.psub.ZL6VVZtAYS/psub.fifo is not a regular file (use -f to see it)(which, if I givelessthe-fargument, it does open). It also leaves acatcommand sitting around in the background doing nothing (frompsub).And yep, that's why I referenced that commit. I went looking for why it changed and came across those in the history.