Turns out I had two go locations in my PATH (sort of). When I ran the command
where go from command prompt two paths were returned.
Something like this..
There apparently was a bat file in
devTools\bin called go.bat. This was unrelated to golang itself, just coincidental naming unfortunately.This was executing instead of the go binary, which in return was throwing the random error with the
Not in an environment message.
To fix the issue I just removed the devTools path from my PATH variable for now.