Skip to content

Commit 9d0bcf1

Browse files
Merge pull request #119 from magento-thunder/MAGECLOUD-1413-2
MAGECLOUD-1413: Gzip fails with exception when directory on file name contains spaces
2 parents 52903d6 + 653c2a6 commit 9d0bcf1

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/Test/Integration/UpgradeTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public function testDefault(string $fromVersion, string $toVersion)
8383
public function defaultDataProvider(): array
8484
{
8585
return [
86-
['^2.1', '2.2.0'],
8786
['2.2.0', '^2.2'],
8887
];
8988
}
@@ -103,6 +102,9 @@ private function assertContentPresence()
103102
$this->assertContains('Home Page', $pageContent, 'Check "Home Page" phrase presence');
104103
}
105104

105+
/**
106+
* @param string $version
107+
*/
106108
private function updateToVersion($version)
107109
{
108110
$sandboxDir = $this->bootstrap->getSandboxDir();

src/Test/Unit/Util/StaticContentCompressorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testCompression()
6262
$runningArray[] = [
6363
$this->logicalAnd(
6464
$this->stringContains('gzip -q --keep'),
65-
$this->stringContains('xargs'),
65+
$this->stringContains('-print0 | xargs -0'),
6666
$this->stringContains($this->staticContentCompressor::TARGET_DIR),
6767
$this->stringContains("-$i")
6868
),

src/Util/PasswordGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function generateRandomPassword(int $length = 20) : string
3737
while (true) {
3838
$password = $this->generateRandomString($length);
3939
/* http://docs.magento.com/m2/ee/user_guide/stores/admin-signin.html
40-
* An Admin password must be seven or more characters long, and include both letters and numbers.
40+
* An Admin password must be seven or more characters long, and include both letters and numbers.
4141
*/
4242
if (( preg_match('/.*[A-Za-z].*/', $password) ) && ( preg_match('/.*[\d].*/', $password) )) {
4343
return $password;

src/Util/StaticContentCompressor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ private function innerCompressionCommand(): string
9898
{
9999
return "find " . escapeshellarg(static::TARGET_DIR) . " -type f -size +300c"
100100
. " '(' -name '*.js' -or -name '*.css' -or -name '*.svg'"
101-
. " -or -name '*.html' -or -name '*.htm' ')'"
102-
. " | xargs -n100 -P16 gzip -q --keep";
101+
. " -or -name '*.html' -or -name '*.htm' ')' -print0"
102+
. " | xargs -0 -n100 -P16 gzip -q --keep";
103103
}
104104

105105
/**

0 commit comments

Comments
 (0)