From 4d7ce8f3fbf7da9bae43958e922b0463b7038735 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 14 Apr 2020 19:16:46 +0200 Subject: [PATCH] Allow overriding the wine prefix manually --- src/plugin/host-bridge.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugin/host-bridge.cpp b/src/plugin/host-bridge.cpp index a5ca119a..587936ce 100644 --- a/src/plugin/host-bridge.cpp +++ b/src/plugin/host-bridge.cpp @@ -561,7 +561,12 @@ fs::path generate_endpoint_name() { * the user's default prefix. */ bp::environment set_wineprefix() { - auto env(boost::this_process::environment()); + auto env = boost::this_process::environment(); + + // Allow the wine prefix to be overridden manually + if (!env["WINEPREFIX"].empty()) { + return env; + } const auto wineprefix_path = find_wineprefix(); if (wineprefix_path.has_value()) {