mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2024-06-09 02:29:30 +00:00
fix for false || true
This commit is contained in:
parent
9d5d3ca9e8
commit
469f0a23c1
|
@ -321,8 +321,7 @@ int exec(std::string command, Environment &env, bool throwup, F &&fx) {
|
||||||
return env.status(-4, throwup);
|
return env.status(-4, throwup);
|
||||||
}
|
}
|
||||||
|
|
||||||
return env.status(rv);
|
return env.status(rv, throwup);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int simple_command::execute(Environment &env, const fdmask &fds, bool throwup) {
|
int simple_command::execute(Environment &env, const fdmask &fds, bool throwup) {
|
||||||
|
@ -352,8 +351,10 @@ int simple_command::execute(Environment &env, const fdmask &fds, bool throwup) {
|
||||||
name = p.arguments.front();
|
name = p.arguments.front();
|
||||||
fs::path path = which(env, name);
|
fs::path path = which(env, name);
|
||||||
if (path.empty()) {
|
if (path.empty()) {
|
||||||
fprintf(stderr, "### MPW Shell - Command \"%s\" was not found.\n", name.c_str());
|
std::string error = "MPW Shell - Command \"" + name + "\" was not found.";
|
||||||
return -1;
|
throw mpw_error(-1, error);
|
||||||
|
//fprintf(stderr, "### MPW Shell - Command \"%s\" was not found.\n", name.c_str());
|
||||||
|
//return -1;
|
||||||
}
|
}
|
||||||
env.set("command", path);
|
env.set("command", path);
|
||||||
p.arguments[0] = path;
|
p.arguments[0] = path;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user