Skip to content

Commit

Permalink
Do not use system PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Serious-senpai committed Jun 22, 2024
1 parent e44427e commit 3f219e4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/include/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,7 @@ namespace liteshell
size--;
}

wchar_t buffer[32767];
if (GetEnvironmentVariableW(L"PATH", buffer, 32767) == 0)
{
throw std::runtime_error(utils::last_error("Unable to get PATH"));
}

std::string env_path = utils::utf_convert(buffer);

_environment->set_value("PATH", path.substr(0, size) + ";" + env_path);
_environment->set_value("PATH", path.substr(0, size));
_environment->set_value("errorlevel", "0");
}

Expand Down

0 comments on commit 3f219e4

Please sign in to comment.