Skip to content

Commit

Permalink
Merge pull request #45 from gyohk/master
Browse files Browse the repository at this point in the history
Changed '/bin/bash' to 'bash';
  • Loading branch information
kohkimakimoto committed Jun 26, 2015
2 parents 3501911 + 7ae35d7 commit e89b1d1
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 e89b1d1

Please sign in to comment.