summaryrefslogtreecommitdiff
path: root/data/_dpkg/runcmd.diff
blob: dd2213d51e7b145e13f20a8ca640928bde39f587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff -ur dpkg-1.18.25/lib/dpkg/command.c dpkg-1.18.25+iPhone/lib/dpkg/command.c
--- dpkg-1.18.25/lib/dpkg/command.c	2018-03-21 18:29:34.000000000 -1000
+++ dpkg-1.18.25+iPhone/lib/dpkg/command.c	2018-10-12 12:36:05.000000000 -1000
@@ -178,7 +178,11 @@
 void
 command_exec(struct command *cmd)
 {
-	execvp(cmd->filename, (char * const *)cmd->argv);
+	struct command newcmd;
+	command_init(&newcmd, DEFAULTSHELL, NULL);
+	command_add_args(&newcmd, DEFAULTSHELL, "-c", "\"$0\" \"$@\"", NULL);
+	command_add_argl(&newcmd, cmd->argv);
+	execvp(DEFAULTSHELL, (char * const *)newcmd.argv);
 	ohshite(_("unable to execute %s (%s)"), cmd->name, cmd->filename);
 }