Socket
Socket
Sign inDemoInstall

which

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
"version": "1.2.0",
"version": "1.2.1",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -32,2 +32,10 @@ # which

## CLI USAGE
Same as the BSD `which(1)` binary.
```
usage: which [-as] program ...
```
## OPTIONS

@@ -34,0 +42,0 @@

@@ -24,4 +24,4 @@ module.exports = which

var ret = (mod & 1)
|| (mod & U) && process.getgid && gid === process.getgid()
|| (mod & G) && process.getuid && uid === process.getuid()
|| (mod & G) && process.getgid && gid === process.getgid()
|| (mod & U) && process.getuid && uid === process.getuid()
|| (mod & UG) && process.getuid && 0 === process.getuid()

@@ -81,3 +81,8 @@

}
var p = path.resolve(pathEnv[i], cmd)
var pathPart = pathEnv[i]
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
pathPart = pathPart.slice(1, -1)
var p = path.resolve(pathPart, cmd)
;(function E (ii, ll) {

@@ -110,3 +115,7 @@ if (ii === ll) return F(i + 1, l)

for (var i = 0, l = pathEnv.length; i < l; i ++) {
var p = path.join(pathEnv[i], cmd)
var pathPart = pathEnv[i]
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
pathPart = pathPart.slice(1, -1)
var p = path.join(pathPart, cmd)
for (var j = 0, ll = pathExt.length; j < ll; j ++) {

@@ -113,0 +122,0 @@ var cur = p + pathExt[j]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc