Skip to content

Commit cee7647

Browse files
committed
Add fix-quarantine.sh script to macOS builds to help users resolve 'damaged app' warnings
- Added automated quarantine fix script for both Intel and ARM64 macOS builds - Script checks for Huntarr.app in current directory and Applications folder - Automatically removes quarantine attributes using xattr commands - Provides clear status messages and error handling - Updated README.txt to include fix script as Option 1 (easiest method) - Users can now run ./fix-quarantine.sh instead of manual terminal commands
1 parent e0ca565 commit cee7647

File tree

2 files changed

+132
-11
lines changed

2 files changed

+132
-11
lines changed

.github/workflows/macos-build-arm64.yml

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
252252
# Create README
253253
cat > installer_temp/README.txt << 'EOF'
254-
Huntarr macOS Apple Silicon (ARM64) Distribution
254+
Huntarr macOS ARM64 (Apple Silicon) Distribution
255255
===============================================
256256
257257
Installation Options:
@@ -268,18 +268,24 @@ jobs:
268268
269269
If you see "Huntarr is damaged and can't be opened":
270270
271-
Option 1 - Remove Quarantine (Recommended):
271+
Option 1 - Use the Fix Script (Easiest):
272+
1. Open Terminal
273+
2. Navigate to this folder: cd /path/to/extracted/huntarr
274+
3. Run: ./fix-quarantine.sh
275+
4. Try opening Huntarr again
276+
277+
Option 2 - Manual Terminal Commands:
272278
1. Open Terminal
273279
2. Run: xattr -cr /Applications/Huntarr.app
274280
3. Run: sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app
275281
4. Try opening Huntarr again
276282
277-
Option 2 - System Preferences:
283+
Option 3 - System Preferences:
278284
1. Go to System Preferences > Security & Privacy > General
279285
2. Click "Open Anyway" next to the Huntarr warning
280286
3. Confirm you want to open it
281287
282-
Option 3 - Right-click Method:
288+
Option 4 - Right-click Method:
283289
1. Right-click on Huntarr.app
284290
2. Select "Open" from the context menu
285291
3. Click "Open" in the security dialog
@@ -293,15 +299,67 @@ jobs:
293299
- Config files are stored in: ~/Library/Application Support/Huntarr/
294300
- Web interface: http://localhost:9705
295301
296-
Compatibility:
297-
- This version is optimized for Apple Silicon Macs (M1, M2, M3, etc.)
298-
- For Intel Macs, use the intel version instead
299-
300302
Support:
301303
- GitHub: https://github.com/plexguide/Huntarr.io
302304
- Documentation: https://plexguide.github.io/Huntarr.io/
303305
EOF
304306
307+
# Create quarantine fix script
308+
cat > installer_temp/fix-quarantine.sh << 'EOF'
309+
#!/bin/bash
310+
echo "Huntarr macOS Quarantine Fix Script"
311+
echo "===================================="
312+
echo ""
313+
314+
# Check if Huntarr.app exists in current directory
315+
if [ ! -d "Huntarr.app" ]; then
316+
echo "❌ Huntarr.app not found in current directory"
317+
echo "Please navigate to the folder containing Huntarr.app and run this script again"
318+
exit 1
319+
fi
320+
321+
echo "🔍 Found Huntarr.app in current directory"
322+
echo ""
323+
324+
# Remove quarantine from current location
325+
echo "🧹 Removing quarantine attributes from Huntarr.app..."
326+
xattr -cr Huntarr.app
327+
if [ $? -eq 0 ]; then
328+
echo "✅ Quarantine attributes removed from current location"
329+
else
330+
echo "⚠️ Warning: Could not remove quarantine attributes (this might be okay)"
331+
fi
332+
333+
# Check if it's installed in Applications
334+
if [ -d "/Applications/Huntarr.app" ]; then
335+
echo ""
336+
echo "🔍 Found Huntarr.app in Applications folder"
337+
echo "🧹 Removing quarantine attributes from Applications..."
338+
xattr -cr /Applications/Huntarr.app
339+
sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app 2>/dev/null
340+
if [ $? -eq 0 ]; then
341+
echo "✅ Quarantine attributes removed from Applications"
342+
else
343+
echo "⚠️ Warning: Could not remove quarantine attributes from Applications"
344+
echo " You may need to run: sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app"
345+
fi
346+
else
347+
echo ""
348+
echo "ℹ️ Huntarr.app not found in Applications folder"
349+
echo " If you plan to install it there, run this script again after installation"
350+
fi
351+
352+
echo ""
353+
echo "🎉 Quarantine fix completed!"
354+
echo ""
355+
echo "You should now be able to open Huntarr without the 'damaged' warning."
356+
echo "If you still see the warning, try:"
357+
echo "1. Right-click on Huntarr.app and select 'Open'"
358+
echo "2. Click 'Open' in the security dialog"
359+
EOF
360+
361+
chmod +x installer_temp/fix-quarantine.sh
362+
305363
# Create archive
306364
version="${{ steps.meta.outputs.VERSION }}"
307365

.github/workflows/macos-build-intel.yml

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,18 +268,24 @@ jobs:
268268
269269
If you see "Huntarr is damaged and can't be opened":
270270
271-
Option 1 - Remove Quarantine (Recommended):
271+
Option 1 - Use the Fix Script (Easiest):
272+
1. Open Terminal
273+
2. Navigate to this folder: cd /path/to/extracted/huntarr
274+
3. Run: ./fix-quarantine.sh
275+
4. Try opening Huntarr again
276+
277+
Option 2 - Manual Terminal Commands:
272278
1. Open Terminal
273279
2. Run: xattr -cr /Applications/Huntarr.app
274280
3. Run: sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app
275281
4. Try opening Huntarr again
276282
277-
Option 2 - System Preferences:
283+
Option 3 - System Preferences:
278284
1. Go to System Preferences > Security & Privacy > General
279285
2. Click "Open Anyway" next to the Huntarr warning
280286
3. Confirm you want to open it
281287
282-
Option 3 - Right-click Method:
288+
Option 4 - Right-click Method:
283289
1. Right-click on Huntarr.app
284290
2. Select "Open" from the context menu
285291
3. Click "Open" in the security dialog
@@ -298,6 +304,63 @@ jobs:
298304
- Documentation: https://plexguide.github.io/Huntarr.io/
299305
EOF
300306
307+
# Create quarantine fix script
308+
cat > installer_temp/fix-quarantine.sh << 'EOF'
309+
#!/bin/bash
310+
echo "Huntarr macOS Quarantine Fix Script"
311+
echo "===================================="
312+
echo ""
313+
314+
# Check if Huntarr.app exists in current directory
315+
if [ ! -d "Huntarr.app" ]; then
316+
echo "❌ Huntarr.app not found in current directory"
317+
echo "Please navigate to the folder containing Huntarr.app and run this script again"
318+
exit 1
319+
fi
320+
321+
echo "🔍 Found Huntarr.app in current directory"
322+
echo ""
323+
324+
# Remove quarantine from current location
325+
echo "🧹 Removing quarantine attributes from Huntarr.app..."
326+
xattr -cr Huntarr.app
327+
if [ $? -eq 0 ]; then
328+
echo "✅ Quarantine attributes removed from current location"
329+
else
330+
echo "⚠️ Warning: Could not remove quarantine attributes (this might be okay)"
331+
fi
332+
333+
# Check if it's installed in Applications
334+
if [ -d "/Applications/Huntarr.app" ]; then
335+
echo ""
336+
echo "🔍 Found Huntarr.app in Applications folder"
337+
echo "🧹 Removing quarantine attributes from Applications..."
338+
xattr -cr /Applications/Huntarr.app
339+
sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app 2>/dev/null
340+
if [ $? -eq 0 ]; then
341+
echo "✅ Quarantine attributes removed from Applications"
342+
else
343+
echo "⚠️ Warning: Could not remove quarantine attributes from Applications"
344+
echo " You may need to run: sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app"
345+
fi
346+
else
347+
echo ""
348+
echo "ℹ️ Huntarr.app not found in Applications folder"
349+
echo " If you plan to install it there, run this script again after installation"
350+
fi
351+
352+
echo ""
353+
echo "🎉 Quarantine fix completed!"
354+
echo ""
355+
echo "You should now be able to open Huntarr without the 'damaged' warning."
356+
echo "If you still see the warning, try:"
357+
echo "1. Right-click on Huntarr.app and select 'Open'"
358+
echo "2. Click 'Open' in the security dialog"
359+
echo ""
360+
EOF
361+
362+
chmod +x installer_temp/fix-quarantine.sh
363+
301364
# Create archive
302365
version="${{ steps.meta.outputs.VERSION }}"
303366

0 commit comments

Comments
 (0)