Skip to content

Commit

Permalink
Add support for args in stdin mode
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed May 26, 2021
1 parent 8fc86f5 commit 8836587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zx.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
process.exit(0)
}

if (typeof firstArg === 'undefined') {
if (typeof firstArg === 'undefined' || firstArg[0] === '-') {
let ok = await scriptFromStdin()
if (!ok) {
console.log(`usage: zx <script>`)
Expand Down

0 comments on commit 8836587

Please sign in to comment.