Skip to content

Commit

Permalink
Merge pull request #1228 from get10101/fix/get-local-ip-macos
Browse files Browse the repository at this point in the history
fix: get local ip on mac
  • Loading branch information
klochowicz authored Sep 7, 2023
2 parents 28ccffb + 4de3adc commit ebb8b11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ public_coordinator_http_port := "80"
# command to get the local IP of this machine
get_local_ip := if os() == "linux" {
"ip -o route get to 1 | sed -n 's/.*src \\([0-9.]\\+\\).*/\\1/p'"
} else if os() == "macos" {
"ipconfig getifaddr en0"
} else {
"ifconfig | grep -Eo 'inet (addr:)?([0-9]*\\.){3}[0-9]*' | grep -Eo '([0-9]*\\.){3}[0-9]*' | grep -v '127.0.0.1'"
"echo 'Only linux and macos are supported';
exit"
}

# RUST_LOG is overriden for FRB codegen invocations it if RUST_LOG isn't info or debug, which means
Expand Down

0 comments on commit ebb8b11

Please sign in to comment.