From 1f41c204f8c5e04e047edd84cb4307d1ea21ff44 Mon Sep 17 00:00:00 2001 From: Shigma Date: Tue, 13 Aug 2024 14:26:36 +0800 Subject: [PATCH] fix(koishi): only capture quote with root argv, fix #1441 --- packages/core/src/command/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/command/index.ts b/packages/core/src/command/index.ts index 3d8266eed..599b16b5a 100644 --- a/packages/core/src/command/index.ts +++ b/packages/core/src/command/index.ts @@ -298,7 +298,9 @@ export class Commander { argv.options = command._aliases[name].options if (command._arguments.length) break } - if (argv.command?.config.captureQuote !== false && quote?.content) { + // https://github.com/koishijs/koishi/issues/1432 + // https://github.com/koishijs/koishi/issues/1441 + if (argv.root && argv.command?.config.captureQuote !== false && quote?.content) { argv.tokens.push({ content: quote.content, quoted: true,