From 0a802aaf7742ef22b5cbccd586d99e16d9d23a39 Mon Sep 17 00:00:00 2001 From: Sebastian Feldmann Date: Fri, 28 Jan 2022 05:35:22 +0100 Subject: [PATCH] Setup custom env variables to configure the plugin --- src/ComposerPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ComposerPlugin.php b/src/ComposerPlugin.php index e317c07..4ea07c4 100644 --- a/src/ComposerPlugin.php +++ b/src/ComposerPlugin.php @@ -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'; } /** @@ -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'; } }