Skip to content

Commit 6bf99de

Browse files
authored
Do not install the captain in CI
This modification will not install The Cap'n in CI-Environments (at least those that go with the de-facto standard to set the `CI` environment variable to `true`). Installing The Cap'n in such environments does not make any sense as there are either no commits going to happen or if so they are going to happen in an automated fashion so breaking those commits is not really helpful. And having a CI-pipeline run by The Cap'n inside a CI-environment feels... weird to say the least.
1 parent 7c0c809 commit 6bf99de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ComposerPlugin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ public function installHooks(Event $event): void
137137
$this->io->write(' <comment>plugin is disabled</comment>');
138138
return;
139139
}
140+
141+
if (getenv('CI') === 'true') {
142+
$this->io->write(' <comment>disabling plugin due to CI-environment</comment>');
143+
return;
144+
}
140145

141146
$this->detectConfiguration();
142147
$this->detectGitDir();

0 commit comments

Comments
 (0)