Skip to content

Commit

Permalink
Merge branch 'master' into 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfeldmann committed Apr 13, 2019
2 parents afe82e3 + d035b99 commit dc837b6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
5 changes: 1 addition & 4 deletions src/Cli/Executable/Abstraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ protected function setup(string $cmd, string $path = '')
*/
public function getCommandLine() : CommandLine
{
$process = $this->createCommandLine();
$process->pipeFail(true);

return $process;
return $this->createCommandLine();
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Cli/Executable/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ public function dumpTo(string $path) : Mysqldump
* Mysqldump CommandLine generator.
*
* @return \SebastianFeldmann\Cli\CommandLine
* @throws \phpbu\App\Exception
*/
protected function createCommandLine() : CommandLine
{
Expand Down
3 changes: 1 addition & 2 deletions tests/phpbu/Backup/Source/MysqldumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ public function testPipeCompression()
$executable = $mysqldump->getExecutable($target);

$this->assertEquals(
'set -o pipefail; '
. PHPBU_TEST_BIN . '/mysqldump --all-databases | '
PHPBU_TEST_BIN . '/mysqldump --all-databases | '
. PHPBU_TEST_BIN . '/gzip > /tmp/foo.sql.gz',
$executable->getCommand()
);
Expand Down
3 changes: 1 addition & 2 deletions tests/phpbu/Backup/Source/TarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ public function testThrottle()
$exec = $tar->getExecutable($target);

$this->assertEquals(
'set -o pipefail; '
. PHPBU_TEST_BIN . '/tar -c -C \''
PHPBU_TEST_BIN . '/tar -c -C \''
. dirname(__DIR__) . '\' \''
. basename(__DIR__) . '\''
. ' | pv -qL \'1m\' > /tmp/backup.tar',
Expand Down
2 changes: 1 addition & 1 deletion tests/phpbu/Cli/Executable/MysqldumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function testCompressor()
$mysqldump->compressOutput($compression)->dumpTo('/tmp/foo.mysql');

$this->assertEquals(
'set -o pipefail; ' . $path . '/mysqldump --all-databases | ' . $path . '/gzip > /tmp/foo.mysql.gz',
$path . '/mysqldump --all-databases | ' . $path . '/gzip > /tmp/foo.mysql.gz',
$mysqldump->getCommand()
);
}
Expand Down
6 changes: 2 additions & 4 deletions tests/phpbu/Cli/Executable/TarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ public function testThrottle()
->throttle('1m');

$this->assertEquals(
'set -o pipefail; '
. PHPBU_TEST_BIN . '/tar -jc -C \'' . $tarC . '\' \'' . $tarD . '\''
PHPBU_TEST_BIN . '/tar -jc -C \'' . $tarC . '\' \'' . $tarD . '\''
. ' | pv -qL \'1m\' > /tmp/foo.tar.bzip2',
$tar->getCommand()
);
Expand All @@ -192,8 +191,7 @@ public function testThrottleAndRemoveSourceDir()
->throttle('1m');

$this->assertEquals(
'set -o pipefail; '
. '(' . PHPBU_TEST_BIN . '/tar -jc -C \'' . $tarC . '\' \'' . $tarD . '\''
'(' . PHPBU_TEST_BIN . '/tar -jc -C \'' . $tarC . '\' \'' . $tarD . '\''
. ' && rm -rf \'' . $dir . '\')'
. ' | pv -qL \'1m\' > /tmp/foo.tar.bzip2',
$tar->getCommand()
Expand Down

0 comments on commit dc837b6

Please sign in to comment.