We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for example given this my-cli.ts script
my-cli.ts
#!/usr/bin/env tsm if (process.argv.includes('-h') || process.argv.includes('--help')) { console.log('my-cli help') process.exit(0) } if (process.argv.includes('-v') || process.argv.includes('--version')) { console.log(`my-cli version'`) process.exit(0) }
when i run ./my-cli.ts -h or ./my-cli.ts -v, i would expect it to output the help / version of my-cli
./my-cli.ts -h
./my-cli.ts -v
however currently the help / version of tsm gets printed instead
in contrast, it behaves as expected when using node in shebang. if changing it to my-cli.js
my-cli.js
#!/usr/bin/env node if (process.argv.includes('-h') || process.argv.includes('--help')) { console.log('my-cli help') process.exit(0) } if (process.argv.includes('-v') || process.argv.includes('--version')) { console.log(`my-cli version'`) process.exit(0) }
and run ./my-cli.js -h or ./my-cli.js -v, it correctly output the help / version of my-cli
./my-cli.js -h
./my-cli.js -v
The text was updated successfully, but these errors were encountered:
No branches or pull requests
for example given this
my-cli.ts
scriptwhen i run
./my-cli.ts -h
or./my-cli.ts -v
, i would expect it to output the help / version of my-clihowever currently the help / version of tsm gets printed instead
in contrast, it behaves as expected when using node in shebang. if changing it to
my-cli.js
and run
./my-cli.js -h
or./my-cli.js -v
, it correctly output the help / version of my-cliThe text was updated successfully, but these errors were encountered: