From 8f07ceb24ce453d7a8432d6e564bd1ef937f9b34 Mon Sep 17 00:00:00 2001 From: Alexander Bazo Date: Wed, 28 Aug 2019 12:59:01 +0200 Subject: [PATCH] Add directory check to library download --- get-gaze-client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/get-gaze-client.js b/get-gaze-client.js index 9641f3b..134cfb7 100644 --- a/get-gaze-client.js +++ b/get-gaze-client.js @@ -25,6 +25,14 @@ function downloadFile(source, target) { }); } +// Make sure vendors folder exists + +if (!fs.existsSync("vendors")){ + fs.mkdirSync("vendors"); +} + +// Download all file + for (let i = 0; i < fileList.length; i++) { let file = fileList[i]; downloadFile(file.url, file.localPath); -- libgit2 0.26.0