Check for `file` command in Tor Browser start script before using it
start-tor-browser we do
SYSARCHITECTURE=$(getconf LONG_BIT) TORARCHITECTURE=$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit:]]*\)') if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then complain "Wrong architecture? 32-bit vs. 64-bit." exit 1 fi
to bail out early in case users have downloaded a bundle for the wrong architecture. Now, it turns out that there are Linux distros out there (NixOS seems to be one of those) that don't find
file that way. A fix for that would be to check for the existence of
file and if we can't find it to note that we assume the user knows what they are doing and proceed anyway.