Current process on port shows partial path for directories with spaces
Created by: rmccue
Is this a bug report?
Yes.
Can you also reproduce the problem with npm 4.x?
Yes.
Environment
-
node -v
:v6.0.11
-
npm -v
:5.5.1
-
yarn --version
(if you use Yarn):1.2.1
-
npm ls react-scripts
(if you haven’t ejected):1.0.17
Then, specify:
- Operating system: macOS 10.12
Steps to Reproduce
mkdir "/tmp/test dir"
create-react-app "/tmp/test dir/a"
create-react-app "/tmp/test dir/b"
cd "/tmp/test dir/a" && npm start"
cd "/tmp/test dir/b" && npm start"
Expected Behavior
? Something is already running on port 3000. Probably:
node scripts/start.js (pid 1337)
in /tmp/test dir/a
Actual Behavior
? Something is already running on port 3000. Probably:
node scripts/start.js (pid 1337)
in /tmp/test
The way awk
is used to get the directory from lsof
causes directories with spaces to have their spaces stripped. This is because it does print $9
, which prints only the 9th field, not any following ones.