Skip to content

Commit

Permalink
Merge pull request #30 from docker/fix_etc_hosts_duplicate_lines
Browse files Browse the repository at this point in the history
Do not re-add segment line in /etc/host if already exists (for hosted runners)
  • Loading branch information
gtardif authored Jun 7, 2024
2 parents 829adb4 + 847585c commit 4c86b15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion start/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 4c86b15

Please sign in to comment.