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

sh-exec

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sh-exec

<a href="https://travis-ci.org/rwu8

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
17
6.25%
Maintainers
1
Weekly downloads
 
Created
Source

Why sh-exec?

Use Template literals write shell script made happy ❤️.

Installation

$ yarn add sh-exec

Examples

import sh from 'sh-exec'
import { version } from '../package.json'

sh`
echo "sh-exec is awesome."
`

sh`
git init
git add .
git commit -m '${version}'
`

Quiet

If you don't like to see the command output or because some security issue.

It's helpful in CI.

import sh from 'sh-exec'

sh.quiet`echo "You can't see"`

Promise Based

sh`
  curl https://a-url.com
`
  .then(stdout => {
    console.log('done')
  })
  .catch(err => {
    console.error(err)
  })

// or
;(async () => {
  const stdout = await sh`
    curl https://a-url.com
  `
})()

Keywords

sh

FAQs

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