Index: chrome/browser/resources/vulcanize.py |
diff --git a/chrome/browser/resources/vulcanize.py b/chrome/browser/resources/vulcanize.py |
index 3752c96503c6f9e3a1893bc3fa05f0b19f61ea04..3256bbb94f883eb9dec80a92d55664127f989e3d 100755 |
--- a/chrome/browser/resources/vulcanize.py |
+++ b/chrome/browser/resources/vulcanize.py |
@@ -39,17 +39,17 @@ _VULCANIZE_BASE_ARGS = [ |
'--inline-css', |
'--inline-scripts', |
- '--redirect', 'chrome://resources/cr_elements/|%s' % _CR_ELEMENTS_PATH, |
- '--redirect', 'chrome://resources/css/|%s' % _CSS_RESOURCES_PATH, |
- '--redirect', 'chrome://resources/html/|%s' % _HTML_RESOURCES_PATH, |
- '--redirect', 'chrome://resources/js/|%s' % _JS_RESOURCES_PATH, |
- '--redirect', 'chrome://resources/polymer/v1_0/|%s' % _POLYMER_PATH, |
+ '--redirect', '"chrome://resources/cr_elements/|%s"' % _CR_ELEMENTS_PATH, |
dpapad
2016/12/20 18:54:08
Perhaps add a comment explaining that this is nece
Dan Beam
2016/12/20 19:03:02
it's necessary for all platforms. there's a | in
|
+ '--redirect', '"chrome://resources/css/|%s"' % _CSS_RESOURCES_PATH, |
+ '--redirect', '"chrome://resources/html/|%s"' % _HTML_RESOURCES_PATH, |
+ '--redirect', '"chrome://resources/js/|%s"' % _JS_RESOURCES_PATH, |
+ '--redirect', '"chrome://resources/polymer/v1_0/|%s"' % _POLYMER_PATH, |
'--strip-comments', |
] |
def _run_cmd(cmd_parts, stdout=None): |
- cmd = "'" + "' '".join(cmd_parts) + "'" |
+ cmd = " ".join(cmd_parts) |
process = subprocess.Popen( |
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) |
stdout, stderr = process.communicate() |
@@ -71,7 +71,7 @@ def _vulcanize(directory, host, html_in_file, html_out_file='vulcanized.html', |
extra_args = extra_args or [] |
output = _run_cmd(['vulcanize'] + _VULCANIZE_BASE_ARGS + extra_args + |
- ['--redirect', 'chrome://%s/|%s' % (host, target_path), |
+ ['--redirect', '"chrome://%s/|%s"' % (host, target_path), |
html_in_path]) |
with tempfile.NamedTemporaryFile(mode='wt+', delete=False) as tmp: |
@@ -88,7 +88,7 @@ def _vulcanize(directory, host, html_in_file, html_out_file='vulcanized.html', |
# TODO(tsergeant): Remove when JS resources are minified by default: |
# crbug.com/619091. |
_run_cmd(['uglifyjs', js_out_path, |
- '--comments', '/Copyright|license|LICENSE|\<\/?if/', |
+ '--comments', '"/Copyright|license|LICENSE|\<\/?if/"', |
'--output', js_out_path]) |
finally: |
os.remove(tmp.name) |