forked from coolaj86/goldilocks.js
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;
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue