Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalchadha committed May 19, 2022
1 parent ab10168 commit 9fc3e0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/MSBuild.Abstractions/BaselineProject.cs
Expand Up @@ -65,8 +65,7 @@ private static string GetCurrentTFM(ImmutableArray<string> globalProperties, Unc
$"{MSBuildFacts.TargetFrameworkNodeName} is not set in {nameof(project.FirstConfiguredProject)}");
}

// MSBuildHelpers.IsNotNetFramework is pretty much never gonna happen...
// but MSBuildHelpers.IsWindows(rawTFM) can happen when coverting a UWP
// MSBuildHelpers.IsWindows(rawTFM) can happen when coverting a UWP
return MSBuildHelpers.IsNotNetFramework(rawTFM) && !MSBuildHelpers.IsWindows(rawTFM) ? StripDecimals(rawTFM) : rawTFM;

static string StripDecimals(string tfm)
Expand Down
9 changes: 1 addition & 8 deletions src/MSBuild.Abstractions/MSBuildHelpers.cs
Expand Up @@ -406,19 +406,12 @@ public static bool ArePropertyGroupElementsIdentical(ProjectPropertyGroupElement
/// <returns>true if string is successfuly unquoted</returns>
private static bool UnquoteString(ref string s)
{
if (s.Length < 2 || s[0] != '\'' || s[^1] != '\'')
if (s.Length < 2 || s[0] != '\'' || s[^1] != '\'' || s[1..^1].Contains('\''))
{
return false;
}

s = s[1..^1];

// Make sure there wasn't another string in there
if (s.Contains('\''))
{
return false;
}

return true;
}

Expand Down

0 comments on commit 9fc3e0b

Please sign in to comment.