Skip to content

Commit 6a89cad

Browse files
committed
fix: avoid use of -Winteractive on macos
1 parent 9925290 commit 6a89cad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

guidebooks/ml/ray/start/kubernetes/events.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ Kubernetes doesn't give us a great way to filter out events that are
44
not associated with our job. We pipe to grep here to work around that.
55

66
```shell.async
7+
if [[ $(uname) = "Linux" ]] then INT="-Winteractive"; fi
78
while true; do
8-
kubectl get events --ignore-not-found ${KUBE_CONTEXT_ARG} ${KUBE_NS_ARG} --watch | awk -Winteractive -v id=$JOB_ID 'index($4, id)>0 {sub(/^[0-9]+s[ ]+/, ""); print "\x1b[1;2;36m[Cluster Event] \x1b[0;2m" $0 "\x1b[0m"; fflush()}' | sed -uE 's/-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}//g'
9+
kubectl get events --ignore-not-found ${KUBE_CONTEXT_ARG} ${KUBE_NS_ARG} --watch | awk $INT -v id=$JOB_ID 'index($4, id)>0 {sub(/^[0-9]+s[ ]+/, ""); print "\x1b[1;2;36m[Cluster Event] \x1b[0;2m" $0 "\x1b[0m"; fflush()}' | sed -uE 's/-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}//g'
910
sleep 2
1011
done
1112
```

0 commit comments

Comments
 (0)