Skip to content

Commit b893bdb

Browse files
committed
fix(cli): fix updateArgv block
1 parent 75a9549 commit b893bdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ async function runScript(
151151

152152
async function readScript() {
153153
const [firstArg] = argv._
154-
updateArgv(argv._.slice(firstArg === undefined ? 0 : 1))
155154

156155
let script = ''
157156
let scriptPath = ''
@@ -173,6 +172,7 @@ async function readScript() {
173172
const { name, ext = argv.ext } = path.parse(new URL(firstArg).pathname)
174173
tempPath = getFilepath($.cwd, name, ext)
175174
} else {
175+
updateArgv(argv._.slice(firstArg === undefined ? 0 : 1))
176176
script = await fs.readFile(firstArg, 'utf8')
177177
scriptPath = firstArg.startsWith('file:')
178178
? url.fileURLToPath(firstArg)

0 commit comments

Comments
 (0)