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

git-bash-shell

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-bash-shell

Use Git Bash as cross-platform shell for Windows

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27
increased by92.86%
Maintainers
1
Weekly downloads
 
Created
Source

git-bash-shell

NPM version AppVeyor Codecov David

Use Git Bash as cross-platform shell for Windows

Why

Install

npm install --save git-bash-shell

Please restart your terminal after successful installation.

Usage

  • npm config

    These npm config items will be compatible under Windows:

    You can edit .npmrc to use a unified terminal:

      shell=/bin/bash
      script-shell=/bin/sh
    
  • env command

    In your package.json file, you can add script prefix env to compatible with Widnows:

    "scripts": {
      "posix": "env echo $SHELL",
    }
    

    Just run npm run posix, it will run for Windows and POSIX

  • Node API:

    await require('git-bash-shell')();
    const spawnSync = require('cross-spawn').sync;
    spawnSync('echo $(git --version)', {
      shell: '/bin/sh',
      stdio: 'inherit',
    });
    

Environment Variables

SHELL

  • Default: /bin/sh
  • Type: path

POSIX specific implementations of shell path.

Keywords

FAQs

Package last updated on 20 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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