rookie mistake: path.join should be path.resolve

This commit is contained in:
AJ ONeal 2017-05-08 16:34:03 -06:00
parent 5f97e1bd67
commit 3a96004038
1 changed files with 3 additions and 3 deletions

View File

@ -32,17 +32,17 @@ function readConfigAndRun(args) {
var config;
if (args.config) {
filename = path.join(cwd, args.config);
filename = path.resolve(cwd, args.config);
text = fs.readFileSync(filename, 'utf8');
}
else {
filename = path.join(cwd, 'goldilocks.yml');
filename = path.resolve(cwd, 'goldilocks.yml');
if (fs.existsSync(filename)) {
text = fs.readFileSync(filename, 'utf8');
}
else {
filename = path.join(cwd, 'goldilocks.json');
filename = path.resolve(cwd, 'goldilocks.json');
if (fs.existsSync(filename)) {
text = fs.readFileSync(filename, 'utf8');
} else {