This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: $PATH contains dot but unclear where it comes from


On 2/19/2014 3:27 PM, Achim Gratz wrote:
Cliff Hones writes:
So there is no dot at the end of PATH as seen in cmd - and (I assume,
since this was also discussed) no duplicated semicolons or trailing
semicolon at the end of the cmd PATH.  But the very first PATH printed
by bash does contain a trailing dot.  I assume this is before bash has
sourced any startup scripts - so where does it come from?

This is actually from the first non-empty, non-comment line in
/etc/profile, where the (converted) windows path is prepended with
"/usr/local/bin:/usr/bin:".  This suggests that the PATH as seen by bash
starts life with that dot appended, but of course it would be more
conclusive if the OP had shown the complete output (and maybe truncated
the windows PATH variable for the experiment).  Looking at the visible
PATH it is quite likely that this variable is rather long and the rest
of the environment may be quite large also.  There are interesting
problems when one or both of these get over a certain size â like for
example Git, which is using environment variables quite extensively,
stopping to work correctly without giving any useful error messages.  It
probably isn't the problem in this case, but the spaces and parens in
the windows path also can become a problem when scripts aren't super
careful with their quoting.

It's certainly possible that there is a pathological case where the Windows
path isn't handled properly because of size, content, or other unforeseen
case.  But if there is a problem like this in Cygwin, we certainly need the
specifics to show us all the problem.  That's not to say that if this issue
tickles someone enough, they shouldn't investigate it more in an attempt
to get to the bottom of it.  But absent that, I think it makes sense to let
Robert show us that this is definitely some Cygwin-specific problem which
could bite anyone with the same conditions.  At that point, it's definitely
something worth talking about more.


--
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]