This is the mail archive of the cygwin-developers@cygwin.com 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: environment setup problem with "env -"


jbuehler wrote:
Igor Pechtchanski wrote:

FWIW, here's what I get on my machine:

$ env - /bin/env
HOMEDRIVE=C:
HOMEPATH=\
LOGONSERVER=\\PECHTCHA
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINNT
USERDOMAIN=PECHTCHA
USERNAME=igor
USERPROFILE=C:\Documents and Settings\igor
$


The one that caused me grief was USERPROFILE.  It caused trouble
because of a 3rd party tool that did not expect any spaces in
its value.  I was a little surprised at first because I am using
env for strict control of the environment.

If they have to stay because Microsoft says so, I guess I'll have
to work around this some other way.

Awhile back, I actually posted a little excerpt from a script I have in my profile.d for Harold. Basically it entailed using sed to "sanitize" the environment of paths with spaces and other POSIX-breaking values (like inheriting TEMP and TMP!). It then either added escapes or converted it to 8.3 format. This is probably the easiest way to work around it, short of getting Cygwin to do this for us.


Cheers,
Nicholas


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