From 8b57f2034d1dd2003b5c7727b6e052ce4334d71e Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Mon, 8 Jul 2024 14:42:57 -0400 Subject: [PATCH] Fix GitHub Actions build on macOS - Install gnu getopt - Replace egrep with grep -E (not necessary?) - Try explicitly setting excludes to an array Otherwise, if it is unset, it appears that (at least on macos), the following expands to an empty string argument rather than no arguments: "${excludes[@]}" --- .github/workflows/test.yml | 2 +- makem.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68d0757c..839f9449 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,7 @@ jobs: - name: Byte compilation run: emacs --eval "(setq byte-compile-error-on-warn (>= emacs-major-version 26))" -L . --batch -f batch-byte-compile ./*.el - name: Tests - run: nix shell ${{ matrix.ledger_version || 'nixpkgs#ledger' }} --print-build-logs -c ./makem.sh test -vv + run: nix shell 'nixpkgs#getopt' ${{ matrix.ledger_version || 'nixpkgs#ledger' }} --print-build-logs -c ./makem.sh test -vv # This is currently for information only, since a lot of docstrings need fixing up - name: Checkdoc run: make lint-checkdoc || true diff --git a/makem.sh b/makem.sh index fd81e0f8..cb8d6bd2 100755 --- a/makem.sh +++ b/makem.sh @@ -406,7 +406,7 @@ function files-project { # matching that pattern with "git ls-files". Excludes submodules. [[ $1 ]] && pattern="/$1" || pattern="." - local excludes + local excludes=() for submodule in $(submodules) do excludes+=(":!:$submodule") @@ -424,7 +424,7 @@ function dirs-project { function files-project-elisp { # Echo list of Elisp files in project. files-project 2>/dev/null \ - | egrep "\.el$" \ + | grep -E "\.el$" \ | filter-files-exclude-default \ | filter-files-exclude-args }