Pass arguments to the programs

This commit is contained in:
Baptiste Wicht 2014-02-12 15:29:25 +01:00
parent e290a761c1
commit 8d6e26a41a

View File

@ -96,7 +96,15 @@ int main(){
} }
if(!found){ if(!found){
auto result = exec_and_wait(params[0].c_str()); std::vector<std::string> args;
if(params.size() > 1){
args.reserve(params.size() - 1);
for(size_t i = 1; i < params.size(); ++i){
args.push_back(params[i]);
}
}
auto result = exec_and_wait(params[0].c_str(), args);
if(!result.valid()){ if(!result.valid()){
print("error: "); print("error: ");