calling native windows programs from cygwin with a sane path environment

12 Feb

some things fail if they’re called from within cygwin due to the path adjustments that are necessary for cygwin.

to call them with a sane (clean) windows-environment, do the following:


OLDPATH=”$PATH”
export PATH=”$(echo $PATH | tr ‘:’ ‘\n’ | grep /cygdrive | tr ‘\n’ ‘:’)”

call your windows tool here

export PATH=”$OLDPATH”

Leave a Reply

Your email address will not be published. Required fields are marked *