H
Herman Schultz
I am running in rake ( I have reproduced the problem with a straight
ruby script ) and I read in a batch file that has a few hundred
environment variables in it. At some magic point when 323 entries are
made to the ENV object, suddenly the ENV object gets corrupted.
Suddenly the adds don't seem to take and later a bunch of my Environment
variables go missing.
The "local_copy" hash does seem to hold but it isn't what I need.
environment.split("\n").each() do |pair|
splitpos = pair.index('=')
if ! splitpos.nil?
key = pair.slice(0, splitpos)
splitpos += 1
value = pair.slice(splitpos, pair.length() - splitpos)
end
if ( ! key.nil? && ! value.nil?)
key.strip!
value.strip!
verbose( ENV.size().to_s() + " -> ENV[#{key}] = " +
value, 1)
ENV[key] = value.dup;
local_copy[key] = value.dup;
else
verbose("Nil value found. Input String: #{pair}", 5)
end
end
output:
...
322 -> ENV[MAS_REV] = 2
323 -> ENV[MAS_VER] = 1.03c
324 -> ENV[MeetingCenterApp] = C:\Program Files\Meeting Center\
324 -> ENV[MINIBOOST_INC] =
F:\source\iie\trunk\external_libs\windows_32\3rdparty\spirit-1.8.4\miniboost
325 -> ENV[MYSQL_DEB_LIB_LOC] =
F:\source\iie\trunk\external_libs\windows_32\3rdparty\mysql\4.1.16\rev1\shared\debug\win32_mtdll
326 -> ENV[MYSQL_DEB_PRODUCT_NAME] = libmysqld
...
363 -> ENV[US_COM_DRS_INC] =
F:\source\iie\trunk\external_libs\windows_32\USCommercialDRS\DRS\10.01.03.M\Non-Dongled
364 -> ENV[US_COM_DRS_LIB_LOC] =
F:\source\iie\trunk\external_libs\windows_32\USCommercialDRS\DRS\10.01.03.M\Non-Dongled
31 -> ENV[US_COM_DRS_PRODUCT_NAME] = POSTAL32
Anyone every ran into this before?
ruby script ) and I read in a batch file that has a few hundred
environment variables in it. At some magic point when 323 entries are
made to the ENV object, suddenly the ENV object gets corrupted.
Suddenly the adds don't seem to take and later a bunch of my Environment
variables go missing.
The "local_copy" hash does seem to hold but it isn't what I need.
environment.split("\n").each() do |pair|
splitpos = pair.index('=')
if ! splitpos.nil?
key = pair.slice(0, splitpos)
splitpos += 1
value = pair.slice(splitpos, pair.length() - splitpos)
end
if ( ! key.nil? && ! value.nil?)
key.strip!
value.strip!
verbose( ENV.size().to_s() + " -> ENV[#{key}] = " +
value, 1)
ENV[key] = value.dup;
local_copy[key] = value.dup;
else
verbose("Nil value found. Input String: #{pair}", 5)
end
end
output:
...
322 -> ENV[MAS_REV] = 2
323 -> ENV[MAS_VER] = 1.03c
324 -> ENV[MeetingCenterApp] = C:\Program Files\Meeting Center\
324 -> ENV[MINIBOOST_INC] =
F:\source\iie\trunk\external_libs\windows_32\3rdparty\spirit-1.8.4\miniboost
325 -> ENV[MYSQL_DEB_LIB_LOC] =
F:\source\iie\trunk\external_libs\windows_32\3rdparty\mysql\4.1.16\rev1\shared\debug\win32_mtdll
326 -> ENV[MYSQL_DEB_PRODUCT_NAME] = libmysqld
...
363 -> ENV[US_COM_DRS_INC] =
F:\source\iie\trunk\external_libs\windows_32\USCommercialDRS\DRS\10.01.03.M\Non-Dongled
364 -> ENV[US_COM_DRS_LIB_LOC] =
F:\source\iie\trunk\external_libs\windows_32\USCommercialDRS\DRS\10.01.03.M\Non-Dongled
31 -> ENV[US_COM_DRS_PRODUCT_NAME] = POSTAL32
Anyone every ran into this before?