fix config_path

This commit is contained in:
lesion 2019-06-26 17:24:16 +02:00
parent b4e0088533
commit a03d9c009b
3 changed files with 2 additions and 3 deletions

View file

@ -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)) {

View file

@ -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')
}

View file

@ -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 = []