Skip to content

Commit

Permalink
fix(create-tnf): process.argv (#33)
Browse files Browse the repository at this point in the history
* fix: argv

* chore: changelog

* Update .changeset/wise-zoos-argue.md

---------

Co-authored-by: chencheng (云谦) <[email protected]>
  • Loading branch information
QDyanbing and sorrycc authored Nov 13, 2024
1 parent e09c563 commit 9a3b65c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wise-zoos-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-tnf': patch
---

fix argv should be sliced from index 2
2 changes: 1 addition & 1 deletion create-tnf/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import yargsParser from 'yargs-parser';
import { create } from './create.js';

async function run(cwd: string) {
const argv = yargsParser(process.argv.slice(1));
const argv = yargsParser(process.argv.slice(2));
return create({
cwd: cwd,
name: argv._[0] as string | undefined,
Expand Down

0 comments on commit 9a3b65c

Please sign in to comment.