Skip to content

Current process on port shows partial path for directories with spaces #3439

@rmccue

Description

@rmccue

Is this a bug report?

Yes.

Can you also reproduce the problem with npm 4.x?

Yes.

Environment

  1. node -v: v6.0.11
  2. npm -v: 5.5.1
  3. yarn --version (if you use Yarn): 1.2.1
  4. npm ls react-scripts (if you haven’t ejected): 1.0.17

Then, specify:

  1. Operating system: macOS 10.12

Steps to Reproduce

  1. mkdir "/tmp/test dir"
  2. create-react-app "/tmp/test dir/a"
  3. create-react-app "/tmp/test dir/b"
  4. cd "/tmp/test dir/a" && npm start"
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions