Socket
Book a DemoInstallSign in
Socket

gitexec

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitexec

A specialised child process spawn for `git` commands

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
2.1K
-13.5%
Maintainers
1
Weekly downloads
 
Created
Source

gitexec Build Status

A specialised child process spawn for git commands

Compatible with Node.js 8.x

Note: while there's nothing currently preventing this from being used to execute arbitrary bash commands, be warned that it's use is focused on git and the API may evolve to be more specific into the future. You're welcome to fork or copy the patterns used if you need similar functionality for other uses.

API

gitexec.exec(repoPath, gitCommand)

Execute gitCommand in a newly spawned Bash shell.

Returns a Stream with stdout. Any non-zero exit code will cause an 'error' event on the stream.

Stderr is printed to directly stderr.

gitexec.execCollect(repoPath, gitCommand, callback)

A form of exec() that collects stdout and returns it as a single String on the callback. Any errors encountered will be given as the first argument to the callback.

License

gitexec is Copyright (c) 2015 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

FAQs

Package last updated on 14 Oct 2019

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