Skip to content

Commit ac3c8c7

Browse files
author
Alex Zepeda
committed
Take a couple more steps to appease the CI gods.
1.) Install gnu-sed on the macOS instances 2.) Remember that which(1) sets a non-zero exit code if it doesn't find each item you've specified. In this case we're searching for 'gsed' and 'sed' in the hopes of finding at least one. The ultimate goal is to prefer gsed if it exists as systems with a BSD userland tend to install GNU tools with a 'g' prefix such that GNU sed is accessible as 'gsed'. GNU sed lets us easily (in a somewhat portable way) edit the second line of a sequence so that we can change one 'pick' to 'edit'. All while pretending to be an interactive text editor to make git happy.
1 parent 5c162e0 commit ac3c8c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup dependencies (macos)
2626
if: startsWith(matrix.os, 'macos')
2727
run:
28-
brew install tree openssl
28+
brew install tree openssl gnu-sed
2929
- name: test
3030
env:
3131
CI: true

git-repository/tests/fixtures/make_rebase_i_repo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ git commit -m 3 3
2525

2626
# NOTE: This relies on GNU sed behavior and will fail on *BSDs (including macOS) without GNU
2727
# sed installed.
28-
sed=$(which gsed sed | head -1)
28+
sed=$(which gsed sed | head -1 || true)
2929

3030
# NOTE: Starting with git 2.35.0 --preserve-merges was renamed to --rebase-merges
3131
# TODO: Revisit this after git 3.x is released

0 commit comments

Comments
 (0)