ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
714 stars 65 forks source link

GITHUB-407: Gracefully handle Cygwin paths on Windows when determining root directory #408

Open anenviousguest opened 1 month ago

anenviousguest commented 1 month ago

Fixes #407

anenviousguest commented 1 month ago

hi @ejoffe , any chance to get the feedback on this ? thanks.

ejoffe commented 1 month ago

Sorry about the delay. Looks good to me. One nit: is there a better check to see if it's cygwin instead of checking the HasPrefix equal to cygdrive? this seems fragile.

anenviousguest commented 1 month ago

Hi @ejoffe

is there a better check to see if it's cygwin instead of checking the HasPrefix equal to cygdrive? this seems fragile.

within shell scripts, the check would typically be based on uname -a command output - but apparently this won't work if spr is running in plain CMD environment. So i didn't want to overcomplicate the implementation which i won't be able to test anyway, because my cygwin paths all start with /cygdrive

anenviousguest commented 1 month ago

@ejoffe any chance to get this merged ? 😅