mirror of
https://aur.archlinux.org/brave-bin.git
synced 2025-09-21 14:09:29 +02:00

The warning message doesn't do much good in build(), the package may not be installed on the system that built it, and it's likely to get lost. Moving it to the launcher (where the same test was being run anyway) and outputting it on STDERR makes the whole thing a bit less of a monkey patch. Also this makes reviewing changes to the AUR package a lot easier, changes to the launcher can be easily reviewed in git.
9 lines
387 B
Bash
9 lines
387 B
Bash
#!/usr/bin/env sh
|
|
|
|
if [[ ! (-r /proc/sys/kernel/unprivileged_userns_clone && $(< /proc/sys/kernel/unprivileged_userns_clone) == 1 && -n $(zcat /proc/config.gz | grep CONFIG_USER_NS=y) ) ]]; then
|
|
>&2 echo "User namespaces are not detected as enabled on your system, brave will run with the sandbox disabled"
|
|
FLAG="--no-sandbox"
|
|
fi
|
|
|
|
exec "/usr/lib/brave-bin/brave" "$FLAG" -- "$@"
|