Skip to content

Commit

Permalink
Setup custom env variables to configure the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfeldmann committed Jan 28, 2022
1 parent 4d33939 commit 0a802aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ComposerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private function detectCaptainExecutable(): void
private function isPluginDisabled(): bool
{
$extra = $this->composer->getPackage()->getExtra();
return (bool) ($extra['captainhook']['disable-plugin'] ?? false);
return ($extra['captainhook']['disable-plugin'] ?? false) || getenv('CAPTAINHOOK_DISABLE') === 'true';
}

/**
Expand All @@ -351,6 +351,6 @@ private function isPluginDisabled(): bool
private function isForceInstall(): bool
{
$extra = $this->composer->getPackage()->getExtra();
return (bool) ($extra['captainhook']['force-install'] ?? false);
return ($extra['captainhook']['force-install'] ?? false) || getenv('CAPTAINHOOK_FORCE_INSTALL') === 'true';
}
}

0 comments on commit 0a802aa

Please sign in to comment.