feat(cli): parse options after dlx (#9735)

close  #9719
This commit is contained in:
Khải
2025-07-10 06:23:40 +07:00
committed by GitHub
parent 8bec871257
commit 6bcfa69964
5 changed files with 75 additions and 4 deletions

View File

@@ -108,8 +108,8 @@ export async function parseCliArgs (
return 'add'
}
function getEscapeArgsWithSpecialCaseForRun (): string[] | undefined {
if (cmd !== 'run') {
function getEscapeArgsWithSpecialCases (): string[] | undefined {
if (cmd !== 'run' && cmd !== 'dlx') {
return opts.escapeArgs
}
@@ -139,7 +139,7 @@ export async function parseCliArgs (
},
inputArgv,
0,
{ escapeArgs: getEscapeArgsWithSpecialCaseForRun() }
{ escapeArgs: getEscapeArgsWithSpecialCases() }
)
const workspaceDir = await getWorkspaceDir(options)