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

fallback-exec-sync

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fallback-exec-sync

Fall back to shelljs if execSync cannot be installed.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fallback-exec-sync

Fall back to shelljs if execSync cannot be installed. On Windows, execSync hards to be installed sometimes because of requirement for installation of node-gyp. Shelljs also has synchronous exec but a little slower than execSync. So one of solutions is that try to install execSync first and if failed, install shelljs.

Install

npm install fallback-exec-sync

Usage

var sh = require('fallback-exec-sync');

code = sh.run('echo 1');
console.log(code); //=> 0

// Note that a little difference from execSync.
// "stdout" is replaced to "output".
res = sh.exec('echo 1');
console.log(res.code); //=> 0
console.log(res.output); //=> 1\n

Test

npm test

License

Licensed under the MIT license.

Special thanks to

  • Keiko Kitagawa

Keywords

FAQs

Package last updated on 11 Jan 2015

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