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

Unified Diff: third_party/node/node.py

Issue 2670723002: [MD History] Vulcanize as part of GN build. (Closed)
Patch Set: Created 3 years, 11 months 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
Index: third_party/node/node.py
diff --git a/third_party/node/node.py b/third_party/node/node.py
index e2e9a3774ae08c7d47d30fff5d7a18a107b72449..5a19126b634a5970cc34687c624f51f3f2fb9f5d 100755
--- a/third_party/node/node.py
+++ b/third_party/node/node.py
@@ -5,6 +5,7 @@
from os import path as os_path
import platform
+import subprocess
def GetBinaryPath():
@@ -13,3 +14,15 @@ def GetBinaryPath():
'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
'Windows': ('win', 'node.exe'),
}[platform.system()])
+
+def RunNode(cmd_parts, stdout=None):
+ cmd = " ".join([GetBinaryPath()] + cmd_parts)
+ process = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+ stdout, stderr = process.communicate()
+
+ if stderr:
+ print >> sys.stderr, '%s failed: %s' % (cmd, stderr)
+ raise
+
+ return stdout
« chrome/browser/resources/vulcanize.gni ('K') | « chrome/browser/resources/vulcanize_gn.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698