Skip to content

Commit f1bbaa9

Browse files
committed
🤖 Fix ImageMagick installation: cache Homebrew downloads only
Changed strategy: - Cache ~/Library/Caches/Homebrew (download cache) instead of Cellar - Let 'brew install imagemagick' run every time (fast with cached downloads) - This ensures proper symlinks in /opt/homebrew/bin - With Depot's 10x faster cache, downloads will be instant Previous approach tried to cache the installed package but that doesn't create PATH symlinks, causing 'magick: command not found' errors.
1 parent ef732da commit f1bbaa9

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/actions/setup-cmux/action.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ runs:
2020
if: runner.os == 'macOS'
2121
uses: actions/cache@v4
2222
with:
23-
path: |
24-
~/Library/Caches/Homebrew
25-
/usr/local/Cellar/imagemagick
26-
/opt/homebrew/Cellar/imagemagick
27-
key: ${{ runner.os }}-brew-imagemagick-7.1
23+
path: ~/Library/Caches/Homebrew
24+
key: ${{ runner.os }}-brew-cache-${{ hashFiles('**/bun.lock') }}
2825
restore-keys: |
29-
${{ runner.os }}-brew-imagemagick-
26+
${{ runner.os }}-brew-cache-
3027
3128
- name: Install dependencies
3229
shell: bash
@@ -36,12 +33,16 @@ runs:
3633
if: runner.os == 'macOS'
3734
shell: bash
3835
run: |
39-
if ! command -v magick &> /dev/null && ! command -v convert &> /dev/null; then
40-
echo "Installing ImageMagick..."
41-
brew install imagemagick
36+
if ! brew list imagemagick &>/dev/null; then
37+
echo "📦 Installing ImageMagick..."
38+
time brew install imagemagick
4239
else
43-
echo "ImageMagick already installed (cached)"
40+
echo "✅ ImageMagick already installed"
41+
brew list imagemagick --versions
4442
fi
43+
# Verify it's in PATH
44+
which magick
45+
magick --version | head -1
4546
4647
- name: Install ImageMagick (Linux)
4748
if: runner.os == 'Linux'

0 commit comments

Comments
 (0)