octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53922] unsetenv does not unset environment va


From: Ian McCallion
Subject: [Octave-bug-tracker] [bug #53922] unsetenv does not unset environment variables on Windows
Date: Thu, 17 May 2018 06:39:24 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Follow-up Comment #3, bug #53922 (project octave):

unsetenv does work sometimes, as this octave command sequence shows:

>> setenv('aa','1')
>> getenv('aa')
ans = 1
>> getenv('AA')
ans = 1
>> unsetenv('aa')
ans = 0
>> getenv('aa')
ans =


However weirdly, in spite of all the environment getting and setting
operations being case-insensitive, windows still saves the environment
variable with its name in its original case as its value is changed, as this
windows commandline sequence shows:


c:\temp3>set aa=1

c:\temp3>set AA=2

c:\temp3>set aa
aa=2

c:\temp3>set AA
aa=2


Hence I reckon unsetenv merely needs to do a case-insensitive comparison (on
Windows only of course) when searching for the environment variable to unset.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53922>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]