From 2c54102dd7315d4f834c4c1a3cf7248ae37dc6f7 Mon Sep 17 00:00:00 2001 From: Patryk Tomczyk <13100280+patzick@users.noreply.github.com> Date: Tue, 25 May 2021 11:14:07 +0200 Subject: [PATCH] fix(cli): config file has priority over default settings (#1510) --- .../src/extensions/shopware-pwa-extension.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/cli/src/extensions/shopware-pwa-extension.ts b/packages/cli/src/extensions/shopware-pwa-extension.ts index 45ebb7852..09afc5a05 100644 --- a/packages/cli/src/extensions/shopware-pwa-extension.ts +++ b/packages/cli/src/extensions/shopware-pwa-extension.ts @@ -75,9 +75,8 @@ module.exports = (toolbox: GluegunToolbox) => { if (directPathExist) return directPath; const nodePackageDistPath = path.join("node_modules", themeName, "dist"); - const nodePackageDistPathExist = require("fs").existsSync( - nodePackageDistPath - ); + const nodePackageDistPathExist = + require("fs").existsSync(nodePackageDistPath); if (nodePackageDistPathExist) return nodePackageDistPath; const nodePackagePath = path.join("node_modules", themeName); @@ -145,16 +144,16 @@ module.exports = (toolbox: GluegunToolbox) => { }: Partial = {}) { toolbox.inputParameters.shopwareEndpoint = toolbox.parameters.options.shopwareEndpoint || - shopwareEndpoint || - toolbox.config.shopwareEndpoint; + toolbox.config.shopwareEndpoint || + shopwareEndpoint; toolbox.inputParameters.shopwareAccessToken = toolbox.parameters.options.shopwareAccessToken || - shopwareAccessToken || - toolbox.config.shopwareAccessToken; + toolbox.config.shopwareAccessToken || + shopwareAccessToken; toolbox.inputParameters.pwaHost = toolbox.parameters.options.pwaHost || - shopwareEndpoint || - toolbox.config.pwaHost; + toolbox.config.pwaHost || + shopwareEndpoint; }; /**