Skip to content

Commit

Permalink
Add var replacement in command
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Weigel committed Jan 12, 2019
1 parent 87a3b67 commit 9c12de6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ function configVars() {
} else {
configd["PYTHON_EXE"] = path.normalize(__dirname + "/../bin/python");
}

var config = require(path.normalize(__dirname + "/../conf/server.json"));
var configfile = path.normalize(__dirname + "/../conf/server.json");
var config = require(configfile);
console.log(ds() + "Reading " + configfile);
for (key in config) {
if (config[key] !== "" && config[key].slice(0,2) !== "__") {
configd[key] = config[key]; // Update default
Expand Down Expand Up @@ -88,7 +89,7 @@ function getmetadata(str) {
}

var obj;

str = replaceConfigVars(str);
if (str.substring(0,4) === 'http') {
console.log(ds() + "Getting " + str + ".");
res = requestSync('GET',str);
Expand Down

0 comments on commit 9c12de6

Please sign in to comment.