Skip to content

Commit

Permalink
fix ymp exec
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Sep 14, 2023
1 parent 178e8f3 commit d326b74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Empty file modified doc/ympshell.rst
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions src/ccode/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ int run_args_silent(char* args[]){
}

int run(char* command){
char* cmd[] = {"sh","-c",command};
char* cmd[] = {"sh","-c",command,"\0"};
return run_args(cmd);
}

int run_silent(char* command){
char* cmd[] = {"sh","-c",command};
char* cmd[] = {"sh","-c",command,"\0"};
return run_args_silent(cmd);
}

Expand Down
4 changes: 2 additions & 2 deletions src/operations/shell/exec.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ public int exec_main (string[] args) {
if (get_destdir () != "/") {
status = run_args ( {"chroot", get_destdir (), cmd}) / 256;
}else if (get_bool ("silent")) {
status = run (cmd + " 2>/dev/null | :") / 256;
status = run_args_silent ( { "sh", "-c" , cmd}) / 256;
}else {
status = run (cmd) / 256;
status = run_args ( { "sh", "-c" , cmd}) / 256;
}
if (status != 0) {
error_add (_ ("Failed to run command: %s").printf (cmd));
Expand Down

0 comments on commit d326b74

Please sign in to comment.