Skip to content

Commit

Permalink
Fix --version argv parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Jan 16, 2022
1 parent fe083c4 commit 3f7c8ca
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 @@ -24,7 +24,7 @@ import {$, fetch, ProcessOutput, argv} from './index.mjs'
import './globals.mjs'

try {
if (argv.version || argv.v || argv.V) {
if (['--version', '-v', '-V'].includes(process.argv[2] || '')) {
console.log(`zx version ${createRequire(import.meta.url)('./package.json').version}`)
process.exit(0)
}
Expand Down

0 comments on commit 3f7c8ca

Please sign in to comment.