#!/bin/sh
# Featherlight launcher (electron/build/after-pack.js). See the comment there.
HERE="$(dirname "$(readlink -f "$0")")"
if [ -n "$APPIMAGE" ]; then
  if [ "$(cat /proc/sys/kernel/apparmor_restrict_unprivileged_userns 2>/dev/null)" = "1" ] ||
     [ "$(cat /proc/sys/kernel/unprivileged_userns_clone 2>/dev/null)" = "0" ]; then
    exec "$HERE/featherlight.bin" --no-sandbox "$@"
  fi
fi
exec "$HERE/featherlight.bin" "$@"
