Skip to content

Commit

Permalink
fix(json): relative extends path failure when not in cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Nov 28, 2017
1 parent f013382 commit b7fdf5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/json.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as _ from "lodash";
import * as fs from "fs";
import { resolve, dirname } from "path";

export namespace json {

Expand Down Expand Up @@ -63,9 +64,9 @@ export namespace json {
}
}

contentUnmerged.push(readSync<T>(path, namedExtends));
contentUnmerged.push(readSync<T>(resolve(dirname(filePath), path), namedExtends));
}

return _.merge<T>({}, ...contentUnmerged, content);
return _.merge({}, ...contentUnmerged, content);
}
}

0 comments on commit b7fdf5d

Please sign in to comment.