From 3283110bd911b5e9317f9d37cb9918f72eda3734 Mon Sep 17 00:00:00 2001 From: "P.BARRY" Date: Wed, 15 Aug 2018 21:47:57 +0200 Subject: [PATCH] fallback for output path --- config.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 4f0b498..5872802 100644 --- a/config.js +++ b/config.js @@ -38,7 +38,6 @@ config.killZone = { right: 25 } -config.output = __dirname config.output = path.join(config.output, 'bobinoscope') try { @@ -46,6 +45,14 @@ try { console.log('[!] Bobinogrammes will be available in: ' + config.output) } catch (e) { console.log('[!] Failed to create folders: ' + config.output) + try { + config.output = process.cwd() + config.output = path.join(config.output, 'bobinoscope') + console.log('[!] Bobinogrammes will be available in: ' + config.output) + } catch (e) { + console.log('[!] Failed to create folders: ' + config.output) + process.exit(1) + } } // Init PATH