rookie mistake: path.join should be path.resolve
This commit is contained in:
parent
5f97e1bd67
commit
3a96004038
|
@ -32,17 +32,17 @@ function readConfigAndRun(args) {
|
||||||
var config;
|
var config;
|
||||||
|
|
||||||
if (args.config) {
|
if (args.config) {
|
||||||
filename = path.join(cwd, args.config);
|
filename = path.resolve(cwd, args.config);
|
||||||
text = fs.readFileSync(filename, 'utf8');
|
text = fs.readFileSync(filename, 'utf8');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
filename = path.join(cwd, 'goldilocks.yml');
|
filename = path.resolve(cwd, 'goldilocks.yml');
|
||||||
|
|
||||||
if (fs.existsSync(filename)) {
|
if (fs.existsSync(filename)) {
|
||||||
text = fs.readFileSync(filename, 'utf8');
|
text = fs.readFileSync(filename, 'utf8');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
filename = path.join(cwd, 'goldilocks.json');
|
filename = path.resolve(cwd, 'goldilocks.json');
|
||||||
if (fs.existsSync(filename)) {
|
if (fs.existsSync(filename)) {
|
||||||
text = fs.readFileSync(filename, 'utf8');
|
text = fs.readFileSync(filename, 'utf8');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue