mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Portability
- Removed unnecessary dependence on Bash: sh is POSIX, bash is not.
This commit is contained in:
parent
23cd59a9a1
commit
968d1c32e8
2 changed files with 17 additions and 2 deletions
|
@ -406,7 +406,7 @@ int execute(const std::string& executable, std::vector<std::string> arguments)
|
|||
|
||||
// create command line before forking because the parent process also needs this for
|
||||
// calling context.debug()
|
||||
char shell[] = "bash";
|
||||
char shell[] = "sh";
|
||||
char opt[] = "-c";
|
||||
|
||||
std::string cmdline = executable;
|
||||
|
@ -425,7 +425,7 @@ int execute(const std::string& executable, std::vector<std::string> arguments)
|
|||
{
|
||||
// this is done by the child process
|
||||
char** argv = new char*[4];
|
||||
argv[0] = shell; // bash
|
||||
argv[0] = shell; // sh
|
||||
argv[1] = opt; // -c
|
||||
argv[2] = (char*)cmdline.c_str(); // e.g. scp undo.data user@host:.task/
|
||||
argv[3] = NULL; // required by execv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue