Skip to content

Commit c6c895b

Browse files
committed
Fix test for path isAbsolute
1 parent b1bb492 commit c6c895b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/Utilities.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ exports.convertPropToJoinKeyProp = function (props, opts) {
271271

272272
exports.getRealPath = function (path_str, stack_index) {
273273
var path = require("path"); // for now, load here (only when needed)
274+
var pathIsAbsolute = require('path-is-absolute');
274275
var cwd = process.cwd();
275276
var err = new Error();
276277
var tmp = err.stack.split(/\r?\n/)[typeof stack_index !== "undefined" ? stack_index : 3], m;
@@ -283,7 +284,7 @@ exports.getRealPath = function (path_str, stack_index) {
283284
cwd = path.dirname(m[1]);
284285
}
285286

286-
if (!path.isAbsolute(path_str)) {
287+
if (!pathIsAbsolute(path_str)) {
287288
path_str = path.join(cwd, path_str);
288289
}
289290
if (path_str.substr(-1) === path.sep) {

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@
3636
},
3737
"analyse" : false,
3838
"dependencies": {
39-
"enforce" : "0.1.6",
40-
"sql-query" : "0.1.26",
41-
"sql-ddl-sync" : "0.3.11",
42-
"hat" : "0.0.3",
43-
"lodash" : "2.4.1"
39+
"enforce" : "0.1.6",
40+
"sql-query" : "0.1.26",
41+
"sql-ddl-sync" : "0.3.11",
42+
"hat" : "0.0.3",
43+
"lodash" : "2.4.1",
44+
"path-is-absolute" : "1.0.0"
4445
},
4546
"devDependencies": {
4647
"mysql" : "2.9.0",

0 commit comments

Comments
 (0)