diff --git a/bin/generate.js b/bin/generate.js index a7dcf8b..23bb30f 100755 --- a/bin/generate.js +++ b/bin/generate.js @@ -90,7 +90,7 @@ if (args.h || args.help || args._.length > 1) { fs.unlinkSync('.tmp-comunica-engine.js'); }); - if (fs.existsSync(path.join(process.cwd(), 'queries.json'))) { + if (fs.existsSync(path.join(process.cwd(), 'queries.json')) && fs.access(path.join(process.cwd(), 'build'))) { fs.renameSync(path.join(process.cwd(), 'queries.json'), path.join(process.cwd(), `${destinationPath}/queries.json`)); }; })();