From d541f064a5ac9ae1cdce89b2374360d6e0fa233c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 26 Feb 2024 22:32:04 +0000 Subject: [PATCH] Fix args in run command --- CHANGELOG.md | 4 +++- src/Console/Command/RunCommand.php | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 157c5d3..2309bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## Unreleased -None. +### Fixed + +- Fix `args` in `run` command. ## 0.3.0 (2024-02-25) diff --git a/src/Console/Command/RunCommand.php b/src/Console/Command/RunCommand.php index 0664da0..968b3c6 100644 --- a/src/Console/Command/RunCommand.php +++ b/src/Console/Command/RunCommand.php @@ -65,7 +65,7 @@ final class RunCommand extends AbstractCommand if ($isDockerCompose) { $process = Process::create( - args: $args, + args: explode(separator: ' ', string: $args ?? ''), command: ['docker', 'compose', 'up'], workingDir: $workingDir, ); @@ -76,7 +76,7 @@ final class RunCommand extends AbstractCommand switch ($projectType) { case ProjectType::Fractal->value: $process = Process::create( - args: $args, + args: explode(separator: ' ', string: $args ?? ''), command: ['npx', 'fractal', 'start', '--sync'], workingDir: $workingDir, ); @@ -87,7 +87,7 @@ final class RunCommand extends AbstractCommand case ProjectType::Sculpin->value: $process = Process::create( - args: $args, + args: explode(separator: ' ', string: $args ?? ''), command: ['./vendor/bin/sculpin', 'generate', '--server', '--watch'], workingDir: $workingDir, );