On 4/25/06, Nick Pilon <[EMAIL PROTECTED]> wrote: > On 4/25/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > On 4/25/06, Nick Pilon <[EMAIL PROTECTED]> wrote: > > > If you try to add a directory that doesn't exist to your PATH using a > > > copy of fish built from the current darcs source, you get a whole lot > > > of confusing errors: > > > > > > set: Could not add component /foo to PATH. > > > set: Value too large to be stored in data type > > > > > > Not only does this not explain what the problem is, but you get it > > > repeated a whole bunch of times. (Every time fish launches a subshell, > > > I think) The Right Thing To Do would seem to be to have a sensible > > > error message (set: Directory does not exist) displayed exactly once. > > > > > > On my system: > > > > fish> set PATH $PATH /fdsa > > set: Could not add component /fdsa to PATH. > > set: No such file or directory > > > > E.g it works exactly as you describe. Any insights into why this is > > broken on OS X is welcome. > > Found the problem. Somewhere between builtin_set.c:507 and > builtin.c:154, errno is getting changed from "2" (no such file or > directory) to "84" (value too large). There are a /lot/ of function > calls between these two lines, and I believe that relying on errno to > remain unchanged across all of them is very bad practice in general. > What the code should be doing is saving the errno after it detects the > error, then using its saved version (perhaps as a parameter to > builtin_wperror ?) instead of the global errno. > > Want me to patch it to do this? There only appear to be about five > calls to builtin_wperror, so it doesn't look too time-consuming.
Thanks for checking this out. A patch would be most welcome, but I'm wondering if that is the only problem. Didn't you say the error message gets printed repeatedly? If so, that implies that something more is going wrong. > > -- > -Nick Pilon > -- Axel ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
