cellar launch now reads and respects wine-path setting (fixes #23)
This commit is contained in:
parent
58c96411a0
commit
d789416c5f
@ -57,8 +57,7 @@ void cellar::config::config_command(int argc, vector<string> argv) {
|
||||
return;
|
||||
}
|
||||
|
||||
string key = argv[2];
|
||||
string newvalue = argv[3];
|
||||
string newvalue = value;
|
||||
string oldvalue = active_bottle.get_config(key);
|
||||
|
||||
if (active_bottle.set_config(key, newvalue)) {
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "subprocess.hpp"
|
||||
|
||||
#include "bottles.hpp"
|
||||
#include "launch.hpp"
|
||||
#include "internal/launch.hpp"
|
||||
#include "output.hpp"
|
||||
@ -14,7 +15,11 @@ using namespace std;
|
||||
using namespace cellar;
|
||||
|
||||
void cellar::launch::launch_program(vector<string> args) {
|
||||
args[0] = "wine";
|
||||
string winepath = bottles::active_bottle.get_config("wine-path");
|
||||
if (winepath == "") { winepath = "wine"; } // lets assume wine is in PATH if there's no config for it
|
||||
// TODO: better support for compiled in defaults (cogrc?)
|
||||
|
||||
args[0] = winepath;
|
||||
launch::popen(args);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user