Hey we are using teamcity which is not really capable of deleting environment parameters / variables
For our agents we need to delete the HTTPS_PROXY, so we set the parameter like that:
params {
param("env.HTTPS_PROXY", "")
}
The equalivalent in powershell to reproduce the issue is this:
$env:HTTPS_PROXY=""
When we execute now bootstrap i get this error:
./bootstrap-vcpkg.bat
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2026-02-21/vcpkg.exe -> C:\BUILD\vcpkg\windows\vcpkg.exe
While calling Windows API function GetEnvironmentVariableW got error 0x00000001:
(unknown error, FormatMessageW failed with 0x00000057)
I did a small test program and the GetEnvironmentVariableW returns false, but does not reset GetLastError(), so GetLastError() will return whatever a previous API call set there.
Expected result:
No error for getting env variable
Don't use proxy
Download starts
Actual result:
Error for getting env variable
download fails
Hey we are using teamcity which is not really capable of deleting environment parameters / variables
For our agents we need to delete the HTTPS_PROXY, so we set the parameter like that:
params {
param("env.HTTPS_PROXY", "")
}
The equalivalent in powershell to reproduce the issue is this:
$env:HTTPS_PROXY=""
When we execute now bootstrap i get this error:
./bootstrap-vcpkg.bat
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2026-02-21/vcpkg.exe -> C:\BUILD\vcpkg\windows\vcpkg.exe
While calling Windows API function GetEnvironmentVariableW got error 0x00000001:
(unknown error, FormatMessageW failed with 0x00000057)
I did a small test program and the GetEnvironmentVariableW returns false, but does not reset GetLastError(), so GetLastError() will return whatever a previous API call set there.
Expected result:
No error for getting env variable
Don't use proxy
Download starts
Actual result:
Error for getting env variable
download fails