On Feb 15 22:57, Andrey Repin wrote: > Greetings, Corinna Vinschen! > > >> >> I would like to request a small functional change for cygpath. > >> >> In the event of empty given path argument (i.e. `cygpath -ml ""') > >> >> silently > >> >> return an empty result without error message. > >> >> This would greatly simplify wrapper scripts. > >> > >> > Why isn't redirecting the message to /dev/null not sufficient, something > >> > like this (bash syntax)? > >> > >> Because it'll require creating a redirection? And this kind of redundant > >> inserts blurring the code. > >> Returning a non-zero exit code would suffice for debugging purposes. > >> > >> > cygpath -ml "" >/dev/null 2&>1 > >> > >> Err, not > /dev/null !!! :D > > > dos_path=$( [ -n "${posix_path}" ] && cygpath -ml "${posix_path}" ) > > > ? > > I appreciate the effort, bit this even MORE complicating the possible use > case. > > Look, I'm asking for simplification without loosing functionality. > If I NEED to check the path for existence, I would write something to the > extent of
I'm getting a bit puzzled. If it's only the message you don't want, then why not just send this message to /dev/null??? NATIVE=$(cygpath -ml "$2" 2>/dev/null) > But if I (and the program that I would feed it to) don't care (which is often > the case), the message printed from cygpath doesn't add to functionality. > > P.S. > I've tried to rebuild it myself, but hit a roadblock. > While trying to rebuild only winsup/utils, this happens That never works. Why don't you just fetch the source archive from the last package and use the cygport file inside? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgpUl9DMGQX4a.pgp
Description: PGP signature