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

@breautek/bash-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@breautek/bash-wrapper

Module for executing bash commands from a Node environment.

  • 0.0.7
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

bash-wrapper-node

Module for executing bash commands from within Node.

For Linux/Mac there are no special requirements.

For Windows, this depends on the Linux Subsystem for Windows, and Windows 10 Creators Update. Previous versions of Windows 10 will not work.

Install

npm install @breautek/bash-wrapper

Note: bash-wrapper is deprecated and will no longer receive updates. Use the organization's @breautek/bash-wrapper instead.

API

string Bash.cwd()

Returns the current working directory.

string Bash.cwd(string)

Sets the current working directory to string.

void exec(commandString, callback)

Asynchronously executes the commandString. The callback parameters are: (error, stdout, stderr)

Note: Never pass unsanitised user input to this function. Any input containing shell metacharacters may be used to trigger arbitrary command execution.

Buffer execSync(commandString)

Synchronously executes the commandString and returns a buffer containing the stdout.

Note: Never pass unsanitised user input to this function. Any input containing shell metacharacters may be used to trigger arbitrary command execution.

void isSupported(callback)

Checks for bash support on the running platform. For Mac/Linux, it is assumed to be true. For windows, support will be true if bash.exe from WSL is findable.

Callback contains 1 parameter: (boolean supported)

FAQs

Package last updated on 12 Oct 2017

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