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
Showing with 5 additions and 2 deletions
+5 -2
......@@ -48,9 +48,11 @@ function getProcessCommand(processId, processDirectory) {
execOptions
);
command = command.replace(/\n$/, '')
if (isProcessAReactApp(command)) {
const packageName = getPackageNameInDirectory(processDirectory);
return packageName ? packageName + '\n' : command;
return packageName ? packageName : command;
} else {
return command;
}
......@@ -68,7 +70,8 @@ function getProcessForPort(port) {
var processId = getProcessIdOnPort(port);
var directory = getDirectoryOfProcessById(processId);
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) {
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