From 847585cb9a6a6a3efcfec610c5ccdef7c0e29914 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Fri, 7 Jun 2024 10:43:16 +0200 Subject: [PATCH] Do not re-add segment line in /etc/host if already exists (for hosted runners) Signed-off-by: Guillaume Tardif --- start/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start/action.yml b/start/action.yml index 957cbd0..955f9c2 100644 --- a/start/action.yml +++ b/start/action.yml @@ -20,7 +20,8 @@ runs: id: redirect-segment shell: bash run: | - echo '127.0.0.2 api.segment.io' | sudo tee -a /etc/hosts + cat /etc/hosts | grep '127.0.0.2 api.segment.io' || echo '127.0.0.2 api.segment.io' | sudo tee -a /etc/hosts + cat /etc/hosts | grep '127.0.0.2 api.segment.io' # Ensure the segment line is there - name: Install macOS Docker Desktop dmg if: runner.os == 'macOS'