diff --git a/lib/config.js b/lib/config.js index c2580e4..c9ecf6e 100644 --- a/lib/config.js +++ b/lib/config.js @@ -68,6 +68,11 @@ exports.loadConfig = async function loadConfig(searchFrom, customConfig) { const configDirName = path.dirname(result.filepath) const parentDir = path.resolve(configDirName, '..') + // The root is reached + if (parentDir === configDirName) { + break + } + result = await explorer.search(parentDir) } diff --git a/package-lock.json b/package-lock.json index 4cb8273..bb5cf60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@nikolay-borzov/torrent-clean", - "version": "1.7.0", + "version": "1.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2366,9 +2366,9 @@ } }, "eslint-config-prettier": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", - "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", + "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -4153,9 +4153,9 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "lint-staged": { - "version": "10.1.6", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.1.6.tgz", - "integrity": "sha512-45zaGxf4XZuwdUk87yRFE/1b4vTZmH2UnYmUPmindsgdAljOFpWWb0yEjxngmqERUS/MGauJexFF6BjLVg9VMA==", + "version": "10.1.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.1.7.tgz", + "integrity": "sha512-ZkK8t9Ep/AHuJQKV95izSa+DqotftGnSsNeEmCSqbQ6j4C4H0jDYhEZqVOGD1Q2Oe227igbqjMWycWyYbQtpoA==", "dev": true, "requires": { "chalk": "^4.0.0", @@ -5501,9 +5501,9 @@ "dev": true }, "prettier": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", - "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", + "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", "dev": true }, "prettier-linter-helpers": { diff --git a/package.json b/package.json index d770393..7eeab15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nikolay-borzov/torrent-clean", - "version": "1.7.0", + "version": "1.7.1", "description": "Deletes files that are not listed in selected torrent file", "keywords": [ "torrent", @@ -72,7 +72,7 @@ "create-temp-directory": "^1.1.1", "create-torrent": "^4.4.1", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.1", + "eslint-config-prettier": "^6.11.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-ava": "^10.2.0", "eslint-plugin-import": "^2.20.2", @@ -82,8 +82,8 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "husky": "^4.2.5", - "lint-staged": "^10.1.6", + "lint-staged": "^10.1.7", "nyc": "^15.0.1", - "prettier": "^2.0.4" + "prettier": "^2.0.5" } }