From a03d9c009b4bafb57bafdf597c57feb2929674ed Mon Sep 17 00:00:00 2001 From: lesion Date: Wed, 26 Jun 2019 17:24:16 +0200 Subject: [PATCH] fix config_path --- config/production.js | 3 +-- server/cli.js | 1 + server/notifier.js | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/production.js b/config/production.js index 1a9a4806..83117d0a 100644 --- a/config/production.js +++ b/config/production.js @@ -1,8 +1,7 @@ -const argv = require('yargs').argv const path = require('path') const fs = require('fs') -const config_path = path.resolve(argv.config || '/etc/gancio_config.json') +const config_path = process.env.config_path let config = {} if (fs.existsSync(config_path)) { diff --git a/server/cli.js b/server/cli.js index 7dbf9fb5..f2540fbc 100755 --- a/server/cli.js +++ b/server/cli.js @@ -215,6 +215,7 @@ This is your first run? You could create it using --install flag`) process.exit(-1) } else { + process.env.config_path = options.config require('./index') } diff --git a/server/notifier.js b/server/notifier.js index 73d129db..af891256 100644 --- a/server/notifier.js +++ b/server/notifier.js @@ -10,7 +10,6 @@ const { event: Event, notification: Notification, event_notification: EventNoti const notifier = { async sendNotification(notification, event) { - console.error('dentro sendNotification ', settingsController.settings, notification.type) const access_token = get(settingsController.secretSettings, 'mastodon_auth.access_token') const instance = get(settingsController.settings, 'mastodon_instance') const promises = []