mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-11 15:40:37 +01:00
Merge pull request #2541 from alexbelgium/copilot/fix-illegal-instruction-error
Fix Illegal instruction crash on aarch64 for Social to Mealie addon
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: Social to Mealie
|
||||
version: "1.4.0"
|
||||
version: "1.4.0-2"
|
||||
slug: social_to_mealie
|
||||
description: Import recipes from social media directly into Mealie
|
||||
url: https://github.com/alexbelgium/hassio-addons
|
||||
|
||||
@@ -4,6 +4,16 @@ set -e
|
||||
|
||||
bashio::log.info "Starting Social to Mealie"
|
||||
cd /app || bashio::exit.nok "App directory not found"
|
||||
|
||||
# On aarch64, native Node.js modules (sharp, @next/swc, etc.) may have been
|
||||
# incorrectly cross-compiled via Docker BuildKit QEMU emulation, causing
|
||||
# "Illegal instruction" crashes on real hardware. Rebuild them for the actual
|
||||
# native architecture.
|
||||
if [ "$(uname -m)" = "aarch64" ]; then
|
||||
bashio::log.info "Ensuring native modules are built for aarch64..."
|
||||
npm rebuild 2>&1 || bashio::log.warning "Could not rebuild native modules - the addon may not work correctly on this architecture"
|
||||
fi
|
||||
|
||||
chown nextjs /app/entrypoint.sh
|
||||
chmod +x /app/entrypoint.sh
|
||||
exec gosu nextjs /app/entrypoint.sh node --run start
|
||||
|
||||
Reference in New Issue
Block a user