Skip to content

zx doesn't seem to work as part of a node bin script #802

Discussion options

You must be logged in to vote

You can avoid bin composition inside your script. As a workaround for now:

#!/usr/bin/env node
import 'zx/globals'

void (async function main() {
  const branch = await $`git branch --show-current`;
  echo(branch);
})();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bkjohnson
Comment options

Answer selected by bkjohnson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants