Skip to content

Commit

Permalink
Fix infinite loop when a config file is at the root
Browse files Browse the repository at this point in the history
- Update dependencies
  • Loading branch information
nikolay-borzov committed Apr 24, 2020
1 parent 0887a44 commit 96d55ce
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
}
}

0 comments on commit 96d55ce

Please sign in to comment.