New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

try-cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

try-cli

A command line utility to try executing a shell command and retry if it fails or repeat even if it succeeds.

latest
Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
2
-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

try 🚀

try is a command line utility to try executing a shell command and retry if it fails. Optionally, you can let it repeat even if it succeeds.

try

You run a long running command and leave to grab a ☕️, hoping to come back to a completed execution but you come back to find that the process failed due to a connectivity issue which is now fixed 🎩. You are now left to re-run the process and spend several caffeine-powered minutes staring at your terminal. Never again!

Usage

Use the try keyword.

Flags

-a, --attempts <number>  => Maximum number of retry attempts.

-t, --timeout  <seconds> => Seconds between retries.

-c, --command  <cmd>     => Command to try

-f, --force-repeat       => Force repeated execution even if it succeeds'

Examples

try -c ls -t 5 -a 5 -f

try --command ls --timeout 5 --attempts 5 --force-repeat

try -c 'ls -la' --timeout 5

try -c "ls -la" --attempts 5

Note that multi-word commands or commands with flags must be enclosed in single or double quotes (' ' or " ").

Made with ❤️.

Keywords

cli

FAQs

Package last updated on 31 Mar 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