diff options
Diffstat (limited to 'Source/cmOutputConverter.cxx')
-rw-r--r-- | Source/cmOutputConverter.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 53cb21e..02981ae 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -243,11 +243,6 @@ std::string cmOutputConverter::EscapeForShell(cm::string_view str, bool unescapeNinjaConfiguration, bool forResponse) const { - // Do not escape shell operators. - if (cmOutputConverterIsShellOperator(str)) { - return std::string(str); - } - // Compute the flags for the target shell environment. int flags = 0; if (this->GetState()->UseWindowsVSIDE()) { @@ -283,6 +278,16 @@ std::string cmOutputConverter::EscapeForShell(cm::string_view str, flags |= Shell_Flag_IsUnix; } + return cmOutputConverter::EscapeForShell(str, flags); +} + +std::string cmOutputConverter::EscapeForShell(cm::string_view str, int flags) +{ + // Do not escape shell operators. + if (cmOutputConverterIsShellOperator(str)) { + return std::string(str); + } + return Shell_GetArgument(str, flags); } |