From 58e6b3317361ccd4dd003faf6bfa59086ebc1cc4 Mon Sep 17 00:00:00 2001 From: Jared Date: Tue, 10 Mar 2020 22:08:38 -0700 Subject: Fix github script --- scripts/add_github.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/add_github.js b/scripts/add_github.js index add3575..543e347 100644 --- a/scripts/add_github.js +++ b/scripts/add_github.js @@ -57,6 +57,8 @@ const compressed = path.join(__dirname, 'tmp.tar.gz'); console.log("Creating temporary directory"); await fs.ensureDir(tempDir); + await fs.ensureDir(recipeSrc); + await fs.ensureDir(recipeSrcTmp); console.log("Downloading " + repo); @@ -71,10 +73,11 @@ const compressed = path.join(__dirname, 'tmp.tar.gz'); console.log("Moving directories"); - await fs.move(recipeSrc, recipeSrcTmp); + await fs.move(recipeSrc, recipeSrcTmp, {overwrite: true}); await fs.move( path.join(tempDir, `${repoInfo.name}-master`), - recipeSrc + recipeSrc, + {overwrite: true} ); console.log("Adding to repository"); -- cgit v1.2.3-70-g09d2