Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bash-path

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bash-path - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

3

package.json
{
"name": "bash-path",
"description": "Get the path to the bash binary on your OS.",
"version": "1.0.2",
"version": "1.0.3",
"homepage": "https://github.com/micromatch/bash-path",

@@ -24,2 +24,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"arr-union": "^3.1.0",
"is-windows": "^1.0.1"

@@ -26,0 +27,0 @@ },

'use strict';
var union = require('arr-union');
var path = require('path');
var defaults = [
'/bin/bash',
'/sbin/bash',
'/usr/bin/bash',
'/usr/local/bin/bash',
'/usr/local/sbin/bash',
'/usr/sbin/bash',
'/usr/X11/bin/bash',
'/opt/local/bin',
'/opt/local/sbin',
'bash'
];
module.exports = function(compare) {
var paths = process.env.PATH.split(path.delimiter);
if (paths.indexOf('/usr/local/bin/bash') === -1) paths.push('/usr/local/bin/bash');
if (paths.indexOf('/bin/bash') === -1) paths.push('/bin/bash');
if (paths.indexOf('bash') === -1) paths.push('bash');
var paths = union([], defaults, process.env.PATH.split(path.delimiter));
if (typeof compare === 'function') {

@@ -11,0 +21,0 @@ paths.sort(compare);

@@ -25,2 +25,6 @@ # bash-path [![NPM version](https://img.shields.io/npm/v/bash-path.svg?style=flat)](https://www.npmjs.com/package/bash-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/bash-path.svg?style=flat)](https://npmjs.org/package/bash-path) [![NPM total downloads](https://img.shields.io/npm/dt/bash-path.svg?style=flat)](https://npmjs.org/package/bash-path) [![Linux Build Status](https://img.shields.io/travis/micromatch/bash-path.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/bash-path) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/bash-path.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/bash-path)

## Windows
Only works on [Windows 10](https://msdn.microsoft.com/en-us/commandline/wsl/about?f=255&MSPPError=-2147217396) or later.
## About

@@ -27,0 +31,0 @@

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