Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Use path-is-inside@1.0.0 to fix #4313.
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Dec 14, 2013
1 parent 9de0716 commit 5ec425c
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ var mkdir = require("mkdirp")
, chmodr = require("chmodr")
, which = require("which")
, isGitUrl = require("./utils/is-git-url.js")
, pathIsInside = require("path-is-inside")

cache.usage = "npm cache add <tarball file>"
+ "\nnpm cache add <folder>"
Expand Down Expand Up @@ -1253,7 +1254,3 @@ function needVersion(er, data) {
: (data && !data.version) ? new Error("No version provided")
: null
}

function pathIsInside (potentialChild, parent) {
return path.relative(parent, potentialChild).indexOf('..') === -1
}
14 changes: 14 additions & 0 deletions node_modules/path-is-inside/LICENSE.txt

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

35 changes: 35 additions & 0 deletions node_modules/path-is-inside/README.md

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

24 changes: 24 additions & 0 deletions node_modules/path-is-inside/lib/path-is-inside.js

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

39 changes: 39 additions & 0 deletions node_modules/path-is-inside/package.json

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

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"github-url-from-username-repo": "0.0.2",
"text-table": "~0.2.0",
"ansicolors": "~0.3.2",
"ansistyles": "~0.1.3"
"ansistyles": "~0.1.3",
"path-is-inside": "~1.0.0"
},
"bundleDependencies": [
"semver",
Expand Down Expand Up @@ -127,7 +128,8 @@
"normalize-package-data",
"text-table",
"ansicolors",
"ansistyles"
"ansistyles",
"path-is-inside"
],
"devDependencies": {
"ronn": "~0.3.6",
Expand Down

0 comments on commit 5ec425c

Please sign in to comment.