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

  • 1.6.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
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

Usage

In your package.json file, you can add script prefix to compatible with Widnows: env, bash, sh, dash or $SHELL.

"scripts": {
	"git:ls-files": "git ls-files > /tmp/git-files",
	"lint:eslint": "eslint `grep \\.js$ /tmp/git-files`",
	"lint:eclint": "eclint check `cat /tmp/git-files`",
	"lint-flow": "env npm-run-all --parallel git:ls-files lint",
}

just run npm run lint-flow, and all npm scripts will work under Windows

Node API:

require('git-bash-shell')();
const spawnSync = require('cross-spawn').sync;
spawnSync('echo `git --version`', {
	shell: true,
	stdio: 'inherit',
});

Environment Variables

SHELL

  • Default: /usr/bin/bash
  • Type: path

POSIX specific implementations of shell path.

ComSpec

  • Default: %ProgramFiles%\Git\usr\bin\bash.exe
  • Type: path

The shell to use for scripts run with the npm run command. If you want to turn off SHELL feature, assign assign environment variable to cmd.exe

PATHEXT

  • Default: %PATHEXT%
  • Type: path list

';'-separated list of suffix to executable file search. If you want to turn off PATHEXT feature, just empty this environment variable

HOME

  • Default: %USERPROFILE%
  • Type: path

Directory path of ~/

Keywords

FAQs

Package last updated on 26 Apr 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