This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: introduction, fix for npm w.r.t. git, and questions
- From: Adam Dinwoodie <adam at dinwoodie dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 20 Apr 2016 19:50:11 +0100
- Subject: Re: introduction, fix for npm w.r.t. git, and questions
- Authentication-results: sourceware.org; auth=none
- References: <BLUPR03MB230DECD3A735AF3CB2225CBDF6D0 at BLUPR03MB230 dot namprd03 dot prod dot outlook dot com>
On Wed, Apr 20, 2016 at 03:21:27PM +0000, Brian Clifton wrote:
> (I've never joined a mailing list so please bear with me as I learn how this works)
Hi Brian, welcome!
> I saw the email chain regarding Git using Windows paths; I wanted to
> share that I've been fighting that too. Specifically, npm will fail
> npm installs because it will try to use the Windows path. I submitted
> the following PR to fix that:
>
> https://github.com/npm/npm/pull/12366
My JavaScript is somewhat rusty, and I've never used npm, but it looks
to me that the problem here is that npm's `process.platform` in `git.js`
is set to 'win32'. Cygwin isn't 'win32' -- it's a fundamentally
different beast that just happens to sit on top of Windows -- so
attempting to treat Cygwin as Windows is going to cause all sorts of
pain.
I think the "correct" fix would be to get npm (or possibly the
JavaScript engine itself?) to stop acting as if it's in a Windows
environment when it's running under Cygwin; the Cygwin environment is
much more like a *nix environment than anything else. I've no idea what
that change would involve, though.
> With how many folks experience issues w/ git on Cygwin,
> I'd like to help popularize *some* kind of fix, whatever it might be,
> since NPM and likely other projects are not willing to support Cygwin.
This sort of experience is, as best I can tell, pretty rare actually.
Generally if you have a user (or a process) running within Cygwin, it's
expecting to use POSIX-style paths exclusively -- the whole point of
Cygwin being to provide a POSIX-like environment on Windows -- and the
only time you need to think about Windows-style paths is if you're
calling a native Windows application from within Cygwin (at which point
you normally know that's what you're doing and can use cygpath).
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple