Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix(cli): config file has priority over default settings (#1510)
Browse files Browse the repository at this point in the history
  • Loading branch information
patzick authored May 25, 2021
1 parent 4f7f007 commit 2c54102
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/cli/src/extensions/shopware-pwa-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -145,16 +144,16 @@ module.exports = (toolbox: GluegunToolbox) => {
}: Partial<ShopwarePwaConfigFile> = {}) {
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;
};

/**
Expand Down

1 comment on commit 2c54102

@vercel
Copy link

@vercel vercel bot commented on 2c54102 May 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.