Skip to content

Commit b4b40b8

Browse files
committed
[NuGetComponent] Adds support of the old possible format for GetNuTool:
gnt.core /t:pack ...
1 parent 8db73fe commit b4b40b8

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

SobaScript.Z.Ext/NuGet/GetNuTool.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void Raw(string data)
6060

6161
data = Regex.Replace
6262
(
63-
data,
63+
FixOldRev(ref data),
6464
@"(?'left'
6565
\/p(?:roperty)?
6666
\s*?:\s*?
@@ -115,6 +115,14 @@ private string UseGnt(string src)
115115
return src;
116116
}
117117

118+
private string FixOldRev(ref string str) => Regex.Replace
119+
(
120+
str,
121+
@"^\s*gnt\.(?:core|bat|cmd)(\s|\/)",
122+
"$1",
123+
RegexOptions.IgnoreCase
124+
);
125+
118126
private string Locate(string item = null)
119127
{
120128
if(item == null) {

0 commit comments

Comments
 (0)