Skip to content

Commit 0a802aa

Browse files
Setup custom env variables to configure the plugin
1 parent 4d33939 commit 0a802aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ComposerPlugin.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ private function detectCaptainExecutable(): void
340340
private function isPluginDisabled(): bool
341341
{
342342
$extra = $this->composer->getPackage()->getExtra();
343-
return (bool) ($extra['captainhook']['disable-plugin'] ?? false);
343+
return ($extra['captainhook']['disable-plugin'] ?? false) || getenv('CAPTAINHOOK_DISABLE') === 'true';
344344
}
345345

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

0 commit comments

Comments
 (0)