From 8cb15a1976d5b2f308b39d8d0a60b753ef4c358f Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Mon, 21 Aug 2023 03:00:58 -0700 Subject: [PATCH] CD into .github dir before getting formulae path (#11) When trying to use formula with a name that is equal to a name of a directory int he current working directory, it will fail to give the correct path to the formula file. Signed-off-by: Yurii Rashkovskii --- action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 5486037..491a2ed 100644 --- a/action.yml +++ b/action.yml @@ -24,10 +24,11 @@ runs: brew update --preinstall brew_repository="$(brew --repository)" mkdir -p .github - cat "$(brew edit --print-path --formula colima)" > .github/brew-colima - cat "$(brew edit --print-path --formula lima)" > .github/brew-lima - cat "$(brew edit --print-path --formula docker )" > .github/brew-docker - cat "$(brew edit --print-path --formula docker-compose)" > .github/brew-docker-compose + cd .github + cat "$(brew edit --print-path --formula colima)" > brew-colima + cat "$(brew edit --print-path --formula lima)" > brew-lima + cat "$(brew edit --print-path --formula docker )" > brew-docker + cat "$(brew edit --print-path --formula docker-compose)" > brew-docker-compose shell: bash - name: Pre-cache run: echo "BREW_CELLAR=$(brew --cellar)" >> $GITHUB_ENV