diff --git a/packages/webpack-cli/lib/utils/flag-defaults.js b/packages/webpack-cli/lib/utils/flag-defaults.js index 64c408b16a6..10940d05d42 100644 --- a/packages/webpack-cli/lib/utils/flag-defaults.js +++ b/packages/webpack-cli/lib/utils/flag-defaults.js @@ -16,7 +16,8 @@ const cacheDefaults = (finalConfig, parsedArgs) => { const assignFlagDefaults = (compilerConfig, parsedArgs) => { if (Array.isArray(compilerConfig)) { return compilerConfig.map((config) => cacheDefaults(config, parsedArgs)); - } else return cacheDefaults(compilerConfig, parsedArgs); + } + return cacheDefaults(compilerConfig, parsedArgs); }; module.exports = assignFlagDefaults; diff --git a/test/core-flags/cache-flags.test.js b/test/core-flags/cache-flags.test.js index ef1d3d5080c..81f56648c2a 100644 --- a/test/core-flags/cache-flags.test.js +++ b/test/core-flags/cache-flags.test.js @@ -70,6 +70,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies correctly when cache type is filesystem', () => { + // TODO: Fix on windows if (isWindows) return; const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.config.js']); expect(stderr).toBeFalsy(); @@ -84,6 +85,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies correctly when cache type is filesystem in config', () => { + // TODO: Fix on windows if (isWindows) return; const { stderr, stdout } = run(__dirname, ['-c', './webpack.cache.config.js']); expect(stderr).toBeFalsy(); @@ -98,6 +100,7 @@ describe('cache related flags from core', () => { }); it('should assign cache build dependencies with multiple configs', () => { + // TODO: Fix on windows if (isWindows) return; const { stderr, stdout, exitCode } = run(__dirname, ['-c', './webpack.cache.config.js', '-c', './webpack.config.js']); expect(stderr).toBeFalsy();