Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2520)

Unified Diff: chrome/browser/resources/vulcanize.py

Issue 2594763002: MD WebUI: fix vulcanize.py for Windows (Closed)
Patch Set: asdf Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698