environment setup problem with "env -"
Nicholas Wourms
nwourms@netscape.net
Tue Jan 13 18:15:00 GMT 2004
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
More information about the Cygwin-developers
mailing list