Socket
Book a DemoInstallSign in
Socket

exec-retry

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exec-retry

child_process#exec with retry on failure

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

exec-retry Circle CI

child_process.exec with a retry functionality using retry.

Features

  • Retry a command until success
  • Set retry options (see retry)
  • It even returns streams, just like node's exec, oh wow
  • Uses debug to log useful information

Installation

$ npm install exec-retry --save

Usage

const exec = require('exec-retry');

exec('curl https://www.roqet.io', function (err, stdout, stderr) {
  // done!
});


// now set max retries number
exec('curl https://www.roqet.io', { retries: 3 }, function (err, stdout, stderr) {
  // fails after 3 retries
});


// and streams!
let ps = exec('ping google.com', function () {
  // done!
});

ps.stdout.on('data', function (data) {
  // stream output
});

Tests

Circle CI

$ make test

License

MIT © Vadym Demedes

Keywords

exec

FAQs

Package last updated on 22 Aug 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