MCPcopy Create free account
hub / github.com/nodejs/node / _EscapeCommandLineArgumentForMSBuild

Function _EscapeCommandLineArgumentForMSBuild

tools/gyp/pylib/gyp/generator/msvs.py:856–864  ·  view source on GitHub ↗

Escapes a Windows command-line argument for use by MSBuild.

(s)

Source from the content-addressed store, hash-verified

854
855
856def _EscapeCommandLineArgumentForMSBuild(s):
857 """Escapes a Windows command-line argument for use by MSBuild."""
858
859 def _Replace(match):
860 return (len(match.group(1)) // 2 * 4) * "\\" + '\\"'
861
862 # Escape all quotes so that they are interpreted literally.
863 s = quote_replacer_regex2.sub(_Replace, s)
864 return s
865
866
867def _EscapeMSBuildSpecialCharacters(s):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected