mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-08 16:29:29 +00:00
fix: update tar command for macOS compatibility and clean up workflow
This commit is contained in:
@@ -5,8 +5,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -136,9 +136,16 @@ class TarBuilder
|
||||
|
||||
private function runTarCommand(string $tarFilePath, string $sourceDir): void
|
||||
{
|
||||
if (PHP_OS_FAMILY === 'Darwin') {
|
||||
$additionalFlags = ' --disable-copyfile --no-xattrs';
|
||||
} else {
|
||||
$additionalFlags = '';
|
||||
}
|
||||
|
||||
// without --disable-copyfile and --no-xattrs combination, tar will fail on macOS
|
||||
$cmd = sprintf(
|
||||
'tar --no-xattrs --disable-copyfile -cf %s -C %s . 2>&1',
|
||||
'tar %s -cf %s -C %s . 2>&1',
|
||||
$additionalFlags,
|
||||
escapeshellarg($tarFilePath),
|
||||
escapeshellarg($sourceDir)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user