Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
2cff8db0
Commit
2cff8db0
authored
7 years ago
by
Rasmus Eneman
Committed by
Joe Haddad
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Display pid in already running message (#3131)
Fixes
#3106
parent
89bf273e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/getProcessForPort.js
+5
-2
packages/react-dev-utils/getProcessForPort.js
with
5 additions
and
2 deletions
+5
-2
packages/react-dev-utils/getProcessForPort.js
+
5
-
2
View file @
2cff8db0
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment