google / zx

A tool for writing better scripts

Home Page:https://npmjs.com/package/zx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Silent command $$

Whoaa512 opened this issue · comments

Sometimes you want to run a command quietly in the background for a user. Maybe to ls a directory to get a list of options or check the user ID, etc.

I currently have a helper like this, but would be nice if it was included in the default set

export const $$ = async (...args) => {
  $.verbose = false
  const result = await $(...args)
  $.verbose = true
  return result
}

What about this?

await quiet($`cmd`)

Same as nothrow().

ezoic increase your site revenue