From 4de3adc79832ee68948900bafa25e657e5c06fcb Mon Sep 17 00:00:00 2001 From: Philipp Hoenisch Date: Wed, 6 Sep 2023 08:12:14 +0200 Subject: [PATCH] fix: get local ip on mac the old command does not return anything for me --- justfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index b3cd58773..258324d9c 100644 --- a/justfile +++ b/justfile @@ -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