diff --git a/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs b/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
index 79ab2aa1ca..afaa58d484 100644
--- a/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
@@ -185,12 +185,6 @@ private static string EscapeArgForCmd(string argument)
internal static bool ShouldSurroundWithQuotes(string argument)
{
- // Don't quote already quoted strings
- if (IsSurroundedWithQuotes(argument))
- {
- return false;
- }
-
// Only quote if whitespace exists in the string
return ArgumentContainsWhitespace(argument);
}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/WindowsExePreferredCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/WindowsExePreferredCommandSpecFactory.cs
index 7815c77f0a..4c5940c7aa 100644
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/WindowsExePreferredCommandSpecFactory.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/WindowsExePreferredCommandSpecFactory.cs
@@ -63,7 +63,8 @@ private CommandSpec CreateCommandSpecWrappedWithCmd(
var cmdEscapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForCmdProcessStart(args);
- if (ArgumentEscaper.ShouldSurroundWithQuotes(command))
+ if (!ArgumentEscaper.IsSurroundedWithQuotes(command) // Don't quote already quoted strings
+ && ArgumentEscaper.ShouldSurroundWithQuotes(command))
{
command = $"\"{command}\"";
}
diff --git a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf
index d97ad03f55..449c774d47 100644
--- a/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf
+++ b/src/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf
@@ -236,12 +236,12 @@
.NET Core SDK (reflecting any global.json):
- .NET Core SDK (reflecting any global.json):
+ Sada .NET Core SDK (vyjadřující jakýkoli global.json):
Runtime Environment:
- Runtime Environment:
+ Běhové prostředí: