Skip to content

Commit

Permalink
Changed '/bin/bash' to 'bash';
Browse files Browse the repository at this point in the history
  • Loading branch information
gyohk committed Jun 25, 2015
1 parent 3501911 commit 7ae35d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Altax/Module/Task/Process/Process.php
Expand Up @@ -128,7 +128,7 @@ protected function compileRealCommand($commandline, $options, $isLocalExecute=FA
$realCommand .= 'sudo -u' . $options["user"] . ' TERM=dumb ';
}

$realCommand .= '/bin/bash -l -c "';
$realCommand .= 'bash -l -c "';

if (isset($options["cwd"])) {
$realCommand .= 'cd ' . $options["cwd"] . ' && ';
Expand Down
6 changes: 3 additions & 3 deletions tests/Altax/Module/Task/Process/ProcessTest.php
Expand Up @@ -51,7 +51,7 @@ public function testRun()
$process->run("echo helloworld", array("cwd" => "~"));
$output = $process->getRuntimeTask()->getOutput()->fetch();
$this->assertRegExp("/helloworld/", $output);
$this->assertRegExp('/Real command: \/bin\/bash -l -c "cd ~ && echo helloworld"/', $output);
$this->assertRegExp('/Real command: bash -l -c "cd ~ && echo helloworld"/', $output);

//echo $output;
}
Expand All @@ -72,7 +72,7 @@ public function testRunLocally1()
if(preg_match('/Windows/i', $os)){
$regexp = '/Real command: cmd.exe \/C "cd ' . preg_quote($homedir, '/') . ' & echo helloworld"/';
}else {
$regexp = '/Real command: \/bin\/bash -l -c "cd ' . preg_quote($homedir, '/') . ' && echo helloworld"/';
$regexp = '/Real command: bash -l -c "cd ' . preg_quote($homedir, '/') . ' && echo helloworld"/';
}
$this->assertRegExp($regexp, $output);
}
Expand All @@ -99,7 +99,7 @@ public function testRunLocally2()
"pwd",
));
$output = $process->getRuntimeTask()->getOutput()->fetch();
$this->assertRegExp('/Real command: \/bin\/bash -l -c "cd \/var\/tmp && pwd"/', $output);
$this->assertRegExp('/Real command: bash -l -c "cd \/var\/tmp && pwd"/', $output);
}
}

Expand Down

0 comments on commit 7ae35d7

Please sign in to comment.