Skip to content

Commit 151f08f

Browse files
chrisdrackettSpaceK33z
authored andcommittedMar 7, 2017
Improve reliability of port hint. (facebook#1696)
* fixing things for people with the username `cwd` closes facebook#1694 * combine awk into a single command and add escaping
1 parent fa4b31e commit 151f08f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/react-cy-dev-utils/getProcessForPort.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getProcessCommand(processId, processDirectory) {
4343
}
4444

4545
function getDirectoryOfProcessById(processId) {
46-
return execSync('lsof -p '+ processId + ' | grep cwd | awk \'{print $9}\'', execOptions).trim();
46+
return execSync('lsof -p '+ processId + ' | awk \'$4=="cwd" {print $9}\'', execOptions).trim();
4747
}
4848

4949
function getProcessForPort(port) {

0 commit comments

Comments
 (0)
Please sign in to comment.