aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-10-16 19:33:48 +0800
committercrupest <crupest@outlook.com>2024-10-16 19:33:48 +0800
commit074c08f8d7d02e4abdda473627edf1801e4eb05b (patch)
tree5e9446ee5322ea0765f09cbca6018db4556b1c4c /tools
parent5ff93715d5e546e7e81d04abe675556b83328761 (diff)
downloadcrupest-074c08f8d7d02e4abdda473627edf1801e4eb05b.tar.gz
crupest-074c08f8d7d02e4abdda473627edf1801e4eb05b.tar.bz2
crupest-074c08f8d7d02e4abdda473627edf1801e4eb05b.zip
fix(secret-tool): no matcher kind will not be parsed.
Diffstat (limited to 'tools')
-rw-r--r--tools/Crupest.SecretTool/Crupest.SecretTool/HostMatchConfig.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/Crupest.SecretTool/Crupest.SecretTool/HostMatchConfig.cs b/tools/Crupest.SecretTool/Crupest.SecretTool/HostMatchConfig.cs
index 5cc0c3d..5d2c504 100644
--- a/tools/Crupest.SecretTool/Crupest.SecretTool/HostMatchConfig.cs
+++ b/tools/Crupest.SecretTool/Crupest.SecretTool/HostMatchConfig.cs
@@ -48,9 +48,10 @@ public class HostMatchConfig(string configString, List<HostMatchKind> allowedMat
foreach (var matchKind in Enum.GetValues<HostMatchKind>())
{
var matchKindName = Enum.GetName(matchKind) ?? throw new Exception("No such match kind.");
- hasExplicitMatchKind = true;
if (segments[0] == matchKindName)
{
+ hasExplicitMatchKind = true;
+
if (segments.Count < 2)
{
throw new FormatException($"Explicit match item needs a value in line {lineNumber}.");