diff --git a/lib/utils.js b/lib/utils.js index 24979d2..b586bec 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -32,7 +32,7 @@ const directoryContainsRootPackageJson = (path) => { const getRepositoryRoot = (path = process.cwd()) => { let pathForCheck = path; - while (pathForCheck !== '/') { + while (pathForCheck !== resolve(pathForCheck, '..')) { if (directoryContainsRootPackageJson(pathForCheck)) { return pathForCheck; }