Skip to content

Commit

Permalink
fix update env php removing pq config
Browse files Browse the repository at this point in the history
  • Loading branch information
ejnshtein committed Oct 18, 2022
1 parent d329865 commit 25e0965
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions build-packages/magento-scripts/lib/tasks/php/update-env-php.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path');
const os = require('os');
const envPhpToJson = require('../../util/env-php-json');
const getJsonfileData = require('../../util/get-jsonfile-data');
const pathExists = require('../../util/path-exists');
const { containerApi } = require('../docker/containers');
Expand Down Expand Up @@ -36,23 +35,8 @@ const updateEnvPHP = () => ({
if (await pathExists(composerLockPath)) {
const composerLockData = await getJsonfileData(composerLockPath);

if (composerLockData.packages.some(({ name }) => name === 'scandipwa/persisted-query')) {
if (typeof ctx.CSAThemeInstalled !== 'boolean') {
ctx.CSAThemeInstalled = true;
}

const envPhp = await envPhpToJson(ctx);

const persistedQueryConfig = envPhp.cache && envPhp.cache['persisted-query'];

if (
persistedQueryConfig
&& persistedQueryConfig.redis
&& (persistedQueryConfig.redis.port !== `${ ctx.ports.redis }`
|| persistedQueryConfig.redis.host === hostMachine)
) {
SETUP_PQ = '';
}
if (!composerLockData.packages.some(({ name }) => name === 'scandipwa/persisted-query')) {
SETUP_PQ = '';
}
}

Expand Down

0 comments on commit 25e0965

Please sign in to comment.