From d21dd493f6f2920da643c140e9891ed806ab4c4f Mon Sep 17 00:00:00 2001 From: M09Ic Date: Thu, 5 Jun 2025 12:29:02 +0800 Subject: [PATCH] fix: -e not expect , https://github.com/chainreactors/spray/issues/108 --- pkg/parse.go | 8 +++++++- templates | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/parse.go b/pkg/parse.go index 88cfbda..5e700bd 100644 --- a/pkg/parse.go +++ b/pkg/parse.go @@ -10,11 +10,17 @@ var ( func ParseEXTPlaceholderFunc(exts []string) func(string) []string { return func(s string) []string { ss := make([]string, len(exts)) + var n int for i, e := range exts { if strings.Contains(s, EXTChar) { + n++ ss[i] = strings.Replace(s, EXTChar, e, -1) } } - return ss + if n == 0 { + return []string{s} + } else { + return ss + } } } diff --git a/templates b/templates index 1f05d5f..fe95f1f 160000 --- a/templates +++ b/templates @@ -1 +1 @@ -Subproject commit 1f05d5f7c2506df8d635997ed1d3b39e0b7c9502 +Subproject commit fe95f1f22d18b6cf2046b004191f5bd745f1c578