Skip to content

Commit

Permalink
fix don't print error about IMPORT_CONFIG if not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
k2s committed Oct 29, 2022
1 parent e78a63f commit ed7fdf7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/server/bootevent.js
Expand Up @@ -72,11 +72,15 @@ function boot (env, language) {
var configURL = env.IMPORT_CONFIG || null;
var url = require('url');
var href = null;
try {
href = url.parse(configURL).href;
} catch (e) {
console.error('Parsing config URL from IMPORT_CONFIG failed');

if (configURL) {
try {
href = url.parse(configURL).href;
} catch (e) {
console.error('Parsing config URL from IMPORT_CONFIG failed');
}
}

if(configURL && href) {
var request = require('request');
console.log('Getting settings from', href);
Expand Down

0 comments on commit ed7fdf7

Please sign in to comment.