Socket
Socket
Sign inDemoInstall

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


Version published
Weekly downloads
10
decreased by-16.67%
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

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 31 Aug 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