From 38f090255ce058312a1241dd17dcd1896bab5174 Mon Sep 17 00:00:00 2001 From: Yuriy Tumanov <57435526+Eljees@users.noreply.github.com> Date: Wed, 28 Oct 2026 22:48:43 +0100 Subject: [PATCH] Commands: Fix `xray api adrules c1.json c2.json` (#7276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/XTLS/Xray-core/pull/7276#pullrequestreview-5680949792 --------- Co-authored-by: 风扇滑翔翼 --- main/commands/all/api/rules_add.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/commands/all/api/rules_add.go b/main/commands/all/api/rules_add.go index fc0fda6c0..a34bd8c4e 100644 --- a/main/commands/all/api/rules_add.go +++ b/main/commands/all/api/rules_add.go @@ -92,6 +92,8 @@ func executeAddRules(cmd *base.Command, args []string) { if err != nil { base.Fatalf("failed to perform AddRule: %s", err) } + // if multiple files are specified, use append to merge them instead of overriding previous one + shouldAppend = true showJSONResponse(resp) } }