From f51d924ec9c46934599539a45a12ce4afcec555d Mon Sep 17 00:00:00 2001 From: d98762625 Date: Fri, 31 Aug 2018 14:48:46 +0100 Subject: [PATCH] Remove duplicate wiping of opconfig in node index config script --- Gruntfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 734fcd18..60241bc7 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -392,14 +392,15 @@ module.exports = function (grunt) { generateNodeIndex: { command: [ "echo '\n--- Regenerating node index ---'", + // Why copy and wipe OperationConfig? + // OperationConfig.json needs to be empty for build to avoid circular dependency on DetectFileType. + // We copy it to node dir so that we can use it as a search corpus in chef.help. "echo 'Copying OperationConfig.json and wiping original'", "cp src/core/config/OperationConfig.json src/node/config/OperationConfig.json", "echo 'export default {};\n' > src/core/config/modules/OpModules.mjs", "echo '[]\n' > src/core/config/OperationConfig.json", "echo '\n OperationConfig.json copied to src/node/config. Modules wiped.'", - "echo 'export default {};\n' > src/core/config/modules/OpModules.mjs", - "echo '[]\n' > src/core/config/OperationConfig.json", "node --experimental-modules src/node/config/scripts/generateNodeIndex.mjs", "echo '--- Node index generated. ---\n'" ].join(";"),