Prefer USERPROFILE over HOMEDRIVE/HOMEPATH
mbrancato opened this issue · 1 comments
mbrancato commented
I originally opened this in a downstream terraform provider including go-homedir
as a dependency. The main issue is that HOMEDRIVE/HOMEPATH are relics of NT4 and not standard environment variables post Windows Vista. They appear to exist sometimes in environments with a history of roaming profiles.
You may read the explanation in the original issue: hashicorp/terraform-provider-azurerm#1395
This document has a table of standard environment variables on Windows: https://msdn.microsoft.com/en-us/library/dd378457(v=vs.85).aspx
Lines 138 to 155 in 3864e76
mitchellh commented
This makes sense to me! Thanks for pointing it out.