Skip to content

Commit

Permalink
fix: path argument is relative to process.cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenQingchuan committed Sep 10, 2022
1 parent 492a625 commit 028a197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -53,7 +53,7 @@ function getTargetDir(dirArg: string): string {
throw new Error("You didn't give a directory path")
}
const targetDir = dirArg.startsWith('.')
? path.join(__dirname, dirArg)
? path.join(process.cwd(), dirArg)
: dirArg.startsWith('/')
? dirArg
: (() => {
Expand Down

0 comments on commit 028a197

Please sign in to comment.