Skip to content

Commit

Permalink
fix(cli): fix updateArgv block
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jan 11, 2025
1 parent 75a9549 commit b893bdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ async function runScript(

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

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

0 comments on commit b893bdb

Please sign in to comment.