Remove duplicate wiping of opconfig in node index config script

This commit is contained in:
d98762625 2018-08-31 14:48:46 +01:00
parent 96d5930f05
commit f51d924ec9
1 changed files with 3 additions and 2 deletions

View File

@ -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(";"),