Commit 2cff8db0 authored by Rasmus Eneman's avatar Rasmus Eneman Committed by Joe Haddad
Browse files

Display pid in already running message (#3131)

Fixes #3106
parent 89bf273e
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 5 additions and 2 deletions
+5 -2
...@@ -48,9 +48,11 @@ function getProcessCommand(processId, processDirectory) { ...@@ -48,9 +48,11 @@ function getProcessCommand(processId, processDirectory) {
execOptions execOptions
); );
command = command.replace(/\n$/, '')
if (isProcessAReactApp(command)) { if (isProcessAReactApp(command)) {
const packageName = getPackageNameInDirectory(processDirectory); const packageName = getPackageNameInDirectory(processDirectory);
return packageName ? packageName + '\n' : command; return packageName ? packageName : command;
} else { } else {
return command; return command;
} }
...@@ -68,7 +70,8 @@ function getProcessForPort(port) { ...@@ -68,7 +70,8 @@ function getProcessForPort(port) {
var processId = getProcessIdOnPort(port); var processId = getProcessIdOnPort(port);
var directory = getDirectoryOfProcessById(processId); var directory = getDirectoryOfProcessById(processId);
var command = getProcessCommand(processId, directory); var command = getProcessCommand(processId, directory);
return chalk.cyan(command) + chalk.blue(' in ') + chalk.cyan(directory); return chalk.cyan(command) + chalk.grey(' (pid ' + processId + ')\n') +
chalk.blue(' in ') + chalk.cyan(directory);
} catch (e) { } catch (e) {
return null; return null;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment