From 32ba6fdbe9962f23d711c9f32d7ffef330daaffc Mon Sep 17 00:00:00 2001 From: Garion Herman Date: Thu, 5 Sep 2019 17:23:38 +1200 Subject: [PATCH] FIX Skip expose calls when 'none' mode is enabled --- src/VendorExposeTask.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/VendorExposeTask.php b/src/VendorExposeTask.php index 8f88144..64eacbe 100644 --- a/src/VendorExposeTask.php +++ b/src/VendorExposeTask.php @@ -75,6 +75,10 @@ public function process(IOInterface $io, array $libraries, $methodKey = null) } $method = $this->getMethod($methodKey); + if ($methodKey === VendorPlugin::METHOD_NONE) { + return; + } + // Update all modules foreach ($libraries as $module) { // Skip this module if no exposure required @@ -138,8 +142,8 @@ protected function getMethod($key) case JunctionMethod::NAME: return new JunctionMethod(); case VendorPlugin::METHOD_NONE: - // 'none' is forced to an empty chain - return new ChainedMethod([]); + // 'none' is forced to an empty chain (and doesn't run anyway) + return new ChainedMethod(); case VendorPlugin::METHOD_AUTO: // Default to safe-failover method if (Platform::isWindows()) {