Skip to content

Commit

Permalink
fix: Fix run-options
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Huber committed Feb 3, 2025
1 parent ebd0996 commit ca6336c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Artifact/Actions/Base/CopyAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Phabalicious\Artifact\Actions\ActionBase;
use Phabalicious\Configuration\HostConfig;
use Phabalicious\Method\TaskContextInterface;
use Phabalicious\ShellProvider\RunOptions;
use Phabalicious\ShellProvider\ShellProviderInterface;
use Phabalicious\Validation\ValidationService;

Expand All @@ -18,7 +19,7 @@ protected function validateArgumentsConfig(array $action_arguments, ValidationSe

private function getDirectoryContents(ShellProviderInterface $shell, $install_dir): array
{
$contents = $shell->run('ls -1a '.$install_dir, true);
$contents = $shell->run('ls -1a '.$install_dir, RunOptions::CAPTURE_AND_HIDE_OUTPUT);

return array_filter($contents->getOutput(), function ($elem) {
return !in_array($elem, ['.', '..']);
Expand Down
2 changes: 1 addition & 1 deletion src/Artifact/Actions/Base/DockerCopyAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function getDirectoryContents(ShellProviderInterface $shell, string $p
'docker run --entrypoint /bin/ls --rm %s -1a %s',
$this->dockerImageName,
$path
), true);
), RunOptions::CAPTURE_AND_HIDE_OUTPUT);

if ($result->failed()) {
$result->throwException('Could not get directory contents from docker image!');
Expand Down

0 comments on commit ca6336c

Please sign in to comment.