sandbox_shell: add missing then to if conditional