Skip to content

Commit

Permalink
Revert "Fix environment block creation (#7401)"
Browse files Browse the repository at this point in the history
This reverts commit 7886f16.
  • Loading branch information
DHowett committed Sep 21, 2020
1 parent 9767abd commit e46ba65
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/types/Environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "precomp.h"
#include "inc/Environment.hpp"
#include "wil/token_helpers.h"

using namespace ::Microsoft::Console::Utils;

Expand All @@ -15,8 +14,7 @@ using namespace ::Microsoft::Console::Utils;
EnvironmentBlockPtr Microsoft::Console::Utils::CreateEnvironmentBlock()
{
void* newEnvironmentBlock{ nullptr };
auto processToken{ wil::open_current_access_token(TOKEN_QUERY | TOKEN_DUPLICATE) };
if (!::CreateEnvironmentBlock(&newEnvironmentBlock, processToken.get(), FALSE))
if (!::CreateEnvironmentBlock(&newEnvironmentBlock, GetCurrentProcessToken(), FALSE))
{
return nullptr;
}
Expand Down

0 comments on commit e46ba65

Please sign in to comment.