summarylogtreecommitdiffstats
path: root/brave-nightly-bin.sh
blob: ea6e6cc4b1e5f443d54b7f127c5a12d9f0080b12 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env sh

if [ -z "$BRAVE_FLAGS" ]; then
    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
fi
exec "/usr/lib/brave-nightly-bin/brave" "$BRAVE_FLAGS" "$FLAG" -- "$@"