Seeker14491 / opener

Open a file or link in the system default program.
Apache License 2.0
49 stars 10 forks source link

On macOS, `opener` uses Safari where as the `open` command uses Firefox #5

Closed djc closed 4 years ago

djc commented 4 years ago

When running code from cargo run in VS Code, the opener::open() call when provided with a URL will open that URL in Safari. If I run open from the command line in the same shell, it opens in Firefox.

Seeker14491 commented 4 years ago

That's strange. On mac all this library does to open a path just boils down to this:

Command::new("open")
    .arg(path_you_provide)
    .stdin(Stdio::null())
    .stdout(Stdio::null())
    .stderr(Stdio::piped())
    .spawn()?;

Therefore I don't see how this issue could be caused by this library. You should experience the same behavior manually running the open command like this in your code.

djc commented 4 years ago

Can't reproduce this now, anyway. Sorry for the noise!