This is the mail archive of the 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: Solving: Quotes in $PATH not translated properly

> -----Original Message-----
> From: Michael A Chase [mailto:mchase at ix dot netcom dot com]
> Sent: Monday, February 24, 2003 6:24 PM
> To: 'cygwin at cygwin dot com'; Harald Kierer
> Subject: Re: Solving: Quotes in $PATH not translated properly
> On Mon, 24 Feb 2003 17:22:54 +0100 Harald Kierer 
> <Harald dot Kierer at astrum dot de> wrote:
> > a current problem when invoking cygwin is: if the Windows PATH
> > variable has quoted paths then cygwin won't translate those paths to
> > POSIX properly, so you end up with an incomplete $PATH:
> > 
> > T:\bin>echo %PATH%
> > "C:\Program Files\abc";[...]
> Are the quotes absolutely necessary inside %path%?  If not, removing
> them would be a useful workaround.

I've been trying to reproduce what the Windows problem was without
the quotes. Unfortunately its buried in a script calling some
make files. A Windows command (IIRC its 'midl') called there didn't
show up without the quotes. It worked fine when the path was quoted,
so Windows seems to need the quotes under certain circumstances.

> > My remaining problem:
> > We launch a lot of scripts from the DOS Box, like 'sh'.
> > This doesn't invoke the profile. How can I launch this 
> path-parser-script
> > every time a bash or ash gets started?
> Just like you show above, with --login.  -rcfile is also possible.

So the solution would be to replace the script calls with
'sh --login -c'. Ok, that shouldnt break anything.

> One problem with doing either blindly is that /etc/profile might
> change the current directory.  See
> for some example
> "one liners" that work around that problem.

I removed the 'cd' from the profile some time ago, but I'll
get a deeper look at your one-liners, thx.

> If the scripts expect to be called from a DOS prompt, something like
> the following inside them might help:
>    if [ -z "$PS1" ]; then
>       cwd="$PWD"
>       . /etc/profile
>       cd "$cwd"
>    fi

Good idea. Guess I'll put this at top of the scripts that have problems
with the path.

> It would be easier to launch your scripts from a normal bash prompt
> if at all possible.

Well, the compile server has tons of scripts that are serialized.
And our developers are usually more comfortable with starting a bat.

I just realize what lazy dicks we are..


Unsubscribe info:
Bug reporting:

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