From 2dca80619612f0c3d540de59a700a5348880eb89 Mon Sep 17 00:00:00 2001 From: Mathieu Santostefano Date: Mon, 5 Feb 2024 14:00:35 +0000 Subject: [PATCH] Fix sed possible failure --- castor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/castor.php b/castor.php index 165cee3..4231423 100644 --- a/castor.php +++ b/castor.php @@ -48,11 +48,11 @@ function setup( file_put_contents('apps/sylius/.php-version', $phpVersion); # Cleanup the composer.json - $repo = capture('gh repo view --json nameWithOwner --jq .nameWithOwner | cat'); + $repo = strtolower(capture('gh repo view --json nameWithOwner --jq .nameWithOwner | cat')); if ($repo === 'no git remotes found') { $repo = "monsieurbiz/project"; } - run('symfony composer config name "' . strtolower($repo) . '"', path: 'apps/sylius/'); + run('symfony composer config name "' . $repo . '"', path: 'apps/sylius/'); run('symfony composer config description "' . $repo . '"', path: 'apps/sylius/'); run('symfony composer config license proprietary', path: 'apps/sylius/'); run('symfony composer config --unset homepage', path: 'apps/sylius/'); @@ -103,8 +103,8 @@ function setup( fs()->appendToFile('apps/sylius/.gitignore', '/public/_themes' . PHP_EOL); # We want to commit the composer.lock and yarn.lock - run('sed -i "" -e "/composer.lock/d" .gitignore', path: 'apps/sylius/'); - run('sed -i "" -e "/yarn.lock/d" .gitignore', path: 'apps/sylius/'); + run('sed -i "" -e "/composer.lock/d" .gitignore', path: 'apps/sylius/', allowFailure: true); + run('sed -i "" -e "/yarn.lock/d" .gitignore', path: 'apps/sylius/', allowFailure: true); # install run('make install', timeout: false);