Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
Open.can_open_browser?
for linux.
It was reported in #151 that when attempting to execute `cb login` on a linux based system that `cb` was returning an error for the `command` command. Regardless of why this command was not found is not necessarily relevant as the underlying calls should be robust enough to tolerate a missing command to open a browser. For instance, even the `xdg-settings` command would have resulted in a command not found and therefore an `IO::Error` being raised for 'headless' systems. Here we fix this by simply wrapping the call out to these commands with a `begin/rescue` block and on failure return `false`. This will ensure that login can continue by presenting just the login url with the requisite session intent information that can be copy pasted to a browser on the host system.
- Loading branch information