Don't filter out empty environment variables

This check was only needed because `operator[]` inserts an empty entry
if the variable doesn't exist. Wine also complains when `WINEPREFIX` is
empty, so we should probably not try to have our own behavior here.
This commit is contained in:
Robbert van der Helm
2021-10-17 16:15:48 +02:00
parent 1eaee22bb9
commit 9aca27a192
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -257,8 +257,7 @@ fs::path normalize_plugin_path(const fs::path& windows_library_path,
std::variant<OverridenWinePrefix, fs::path, DefaultWinePrefix> find_wine_prefix(
fs::path windows_plugin_path) {
const bp::environment env = boost::this_process::environment();
if (const auto prefix = env.find("WINEPREFIX");
prefix != env.end() && !prefix->empty()) {
if (const auto prefix = env.find("WINEPREFIX"); prefix != env.end()) {
return OverridenWinePrefix{prefix->to_string()};
}