diff --git a/src/index.js b/src/index.js index 4f88c35..f0d9e1c 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ const defaultValue = require("default-value"); let defaultCheckers = { "package.json": function(directory) { - let parentPackageFile = path.join(directory, `..${path.sep}..${path.sep}package.json`); + let parentPackageFile = path.join(directory, "..", "..", "package.json"); try { fs.accessSync(parentPackageFile); @@ -74,7 +74,7 @@ module.exports = function(options) { } if (rootFound === false) { - currentPath = path.join(currentPath, `..${path.sep}..`); + currentPath = path.join(currentPath, "..", ".."); } }