Commit 887fd10e authored by Ryan McCue's avatar Ryan McCue Committed by Dan Abramov
Browse files

Print full directory name from lsof (#3440)

awk splits lines based on spaces, which causes directory names with spaces to end up in other fields. Using a for loop allows us to print from the 9th field onwards instead of just the 9th field.
parent dccc752c
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 1 addition and 1 deletion
+1 -1
...@@ -58,7 +58,7 @@ function getProcessCommand(processId, processDirectory) { ...@@ -58,7 +58,7 @@ function getProcessCommand(processId, processDirectory) {
function getDirectoryOfProcessById(processId) { function getDirectoryOfProcessById(processId) {
return execSync( return execSync(
'lsof -p ' + processId + ' | awk \'$4=="cwd" {print $9}\'', 'lsof -p ' + processId + ' | awk \'$4=="cwd" {for (i=9; i<=NF; i++) printf "%s ", $i}\'',
execOptions execOptions
).trim(); ).trim();
} }
......
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