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

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/chrome_debug_launcher/launch_chrome.js

Issue 2472913005: DevTools: Don't show an error in npm start when CHROMIUM_PATH is missing (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var childProcess = require("child_process"); 5 var childProcess = require("child_process");
6 var fs = require("fs"); 6 var fs = require("fs");
7 var path = require("path"); 7 var path = require("path");
8 var shell = childProcess.execSync; 8 var shell = childProcess.execSync;
9 9
10 var remoteDebuggingPort = parseInt(process.env.REMOTE_DEBUGGING_PORT, 10) || 922 2; 10 var remoteDebuggingPort = parseInt(process.env.REMOTE_DEBUGGING_PORT, 10) || 922 2;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 { 71 {
72 console.log(`Launching Chrome from ${filePath}`); 72 console.log(`Launching Chrome from ${filePath}`);
73 console.log("Chrome args:", chromeArgs.join(" "), "\n"); 73 console.log("Chrome args:", chromeArgs.join(" "), "\n");
74 var child; 74 var child;
75 try { 75 try {
76 child = childProcess.spawn(filePath, chromeArgs, { 76 child = childProcess.spawn(filePath, chromeArgs, {
77 stdio: "ignore", 77 stdio: "ignore",
78 }); 78 });
79 } catch (error) { 79 } catch (error) {
80 onLaunchChromeError(); 80 onLaunchChromeError();
81 if (cleanup)
82 cleanup();
83 return;
81 } 84 }
82 child.on("error", onLaunchChromeError); 85 child.on("error", onLaunchChromeError);
83 child.on("exit", onExit); 86 child.on("exit", onExit);
84 function onExit(code) 87 function onExit(code)
85 { 88 {
86 if (cleanup) 89 if (cleanup)
87 cleanup(); 90 cleanup();
88 console.log("Exited Chrome with code", code); 91 console.log("Exited Chrome with code", code);
89 } 92 }
90 } 93 }
(...skipping 15 matching lines...) Expand all
106 { 109 {
107 var string = buffer.toString(); 110 var string = buffer.toString();
108 console.log(string); 111 console.log(string);
109 return string; 112 return string;
110 } 113 }
111 114
112 function shellOutput(command) 115 function shellOutput(command)
113 { 116 {
114 return shell(command).toString().trim(); 117 return shell(command).toString().trim();
115 } 118 }
OLDNEW
« 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