Skip to content

Commit

Permalink
Issue #98: Fix GitHub shared helpers (#100)
Browse files Browse the repository at this point in the history
* Issue #98: Fix GitHub shared helpers

Fixes common GitHub actions not being pulled in when no specific packages are selected in composer.json
  • Loading branch information
justafish authored Jun 30, 2022
1 parent 83d480b commit 7fc3afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ScaffoldInstallerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private function installCICommands(): void
$fs = new Filesystem();
// GitLab
$fs->removeDirectory('./.drainpipe/gitlab');
if (!empty($this->extra['drainpipe']['gitlab'])) {
if (isset($this->extra['drainpipe']['gitlab']) && is_array($this->extra['drainpipe']['gitlab'])) {
$fs->ensureDirectoryExists('./.drainpipe/gitlab');
$fs->copy("$scaffoldPath/gitlab/Common.gitlab-ci.yml", ".drainpipe/gitlab/Common.gitlab-ci.yml");
$this->io->write("🪠 [Drainpipe] .drainpipe/gitlab/Common.gitlab-ci.yml installed");
Expand Down Expand Up @@ -230,7 +230,7 @@ private function installCICommands(): void
}
// GitHub
$fs->removeDirectory('./.github/actions/drainpipe');
if (!empty($this->extra['drainpipe']['github'])) {
if (isset($this->extra['drainpipe']['github']) && is_array($this->extra['drainpipe']['github'])) {
$fs->ensureDirectoryExists('./.github/actions');
$fs->copy("$scaffoldPath/github/actions/common", './.github/actions/drainpipe');
foreach ($this->extra['drainpipe']['github'] as $github) {
Expand Down

0 comments on commit 7fc3afc

Please sign in to comment.