Fix config path resolution

master
Sven Slootweg 2 years ago
parent 00685bb7e9
commit 4163b7deb9

@ -12,7 +12,7 @@ const chalk = require("chalk");
let argv = yargs.argv; let argv = yargs.argv;
let [ configurationPath, task, item ] = argv._; let [ configurationPath, task, item ] = argv._;
let absoluteConfigurationPath = path.join(process.cwd(), configurationPath); let absoluteConfigurationPath = path.resolve(process.cwd(), configurationPath);
let configuration = require(absoluteConfigurationPath); let configuration = require(absoluteConfigurationPath);
return Promise.try(() => { return Promise.try(() => {

@ -17,7 +17,7 @@ let configurationPath = argv._[0];
let listenHost = argv.listenHost ?? "127.0.0.1"; let listenHost = argv.listenHost ?? "127.0.0.1";
let listenPort = argv.listenPort ?? 3131; let listenPort = argv.listenPort ?? 3131;
let absoluteConfigurationPath = path.join(process.cwd(), configurationPath); let absoluteConfigurationPath = path.resolve(process.cwd(), configurationPath);
let configuration = require(absoluteConfigurationPath); let configuration = require(absoluteConfigurationPath);
return Promise.try(() => { return Promise.try(() => {

@ -38,7 +38,7 @@ let configurationPath = argv._[0];
let listenHost = argv.listenHost ?? "127.0.0.1"; let listenHost = argv.listenHost ?? "127.0.0.1";
let listenPort = argv.listenPort ?? 3000; let listenPort = argv.listenPort ?? 3000;
let absoluteConfigurationPath = path.join(process.cwd(), configurationPath); let absoluteConfigurationPath = path.resolve(process.cwd(), configurationPath);
let configuration = require(absoluteConfigurationPath); let configuration = require(absoluteConfigurationPath);
return Promise.try(() => { return Promise.try(() => {

@ -12,7 +12,7 @@ const chalk = require("chalk");
let argv = yargs.argv; let argv = yargs.argv;
let [ configurationPath, task, item ] = argv._; let [ configurationPath, task, item ] = argv._;
let absoluteConfigurationPath = path.join(process.cwd(), configurationPath); let absoluteConfigurationPath = path.resolve(process.cwd(), configurationPath);
let configuration = require(absoluteConfigurationPath); let configuration = require(absoluteConfigurationPath);
return Promise.try(() => { return Promise.try(() => {

Loading…
Cancel
Save