Skip to content

Commit

Permalink
Fix sed possible failure
Browse files Browse the repository at this point in the history
  • Loading branch information
welcoMattic authored Feb 5, 2024
1 parent 2f756fa commit 2dca806
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/');
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2dca806

Please sign in to comment.