Comments (13)
That's because the currently released version of rustup is using v0.4.1 of this crate. There hasn't been a rustup release since I made the PR updating to v0.5.
from opener.
ooooh i get it, so this gonna be fixed when the pr is accepted, thanks for your time!
from opener.
I'm closing this issue. Feel free to make a new issue if this is still a problem with the current version of the library.
from opener.
@japrogramer continuing our discussion from rust-lang/rustup#1125, if you don't mind, I'd like you to check if my updated branch works for you by running the following commands.
First, confirm the bug triggers on the master
branch:
git clone https://github.com/Seeker14491/opener.git
cd opener/opener-bin/
echo 'Hello' > index.html
cargo run -- index.html
If you get the message Opened path successfully.
, but nothing happens, you've triggered the bug.
Then, check if the inherit-stdio
branch works correctly and opens your browser:
git checkout -f inherit-stdio
echo 'Hello' > index.html
cargo run -- index.html
from opener.
The first set of commands work.
▶ cargo run -- index.html 69%
Compiling unicode-width v0.1.6
Compiling rustc-demangle v0.1.16
Compiling ansi_term v0.11.0
Compiling cfg-if v0.1.10
Compiling strsim v0.8.0
Compiling vec_map v0.8.1
Compiling opener v0.4.1 (/home/archangel/Code/Rust/opener/opener)
Compiling libc v0.2.65
Compiling bitflags v1.2.1
Compiling textwrap v0.11.0
Compiling atty v0.2.13
Compiling backtrace-sys v0.1.32
Compiling backtrace v0.3.40
Compiling clap v2.33.0
Compiling failure v0.1.6
Compiling structopt v0.3.3
Compiling opener-bin v0.1.0 (/home/archangel/Code/Rust/opener/opener-bin)
Finished dev [unoptimized + debuginfo] target(s) in 13.75s
Running `/home/archangel/Code/Rust/opener/target/debug/opener-bin index.html`
Opened path successfully.
and the second in the other branch also works
▶ cargo run -- index.html 67%
Compiling proc-macro2 v1.0.6
Compiling unicode-xid v0.2.0
Compiling syn v1.0.5
Compiling libc v0.2.65
Compiling cc v1.0.46
Compiling bitflags v1.2.1
Compiling unicode-width v0.1.6
Compiling unicode-segmentation v1.3.0
Compiling failure_derive v0.1.6
Compiling vec_map v0.8.1
Compiling strsim v0.8.0
Compiling rustc-demangle v0.1.16
Compiling ansi_term v0.11.0
Compiling cfg-if v0.1.10
Compiling opener v0.4.1 (/home/archangel/Code/Rust/opener/opener)
Compiling textwrap v0.11.0
Compiling heck v0.3.1
Compiling backtrace-sys v0.1.32
Compiling atty v0.2.13
Compiling clap v2.33.0
Compiling quote v1.0.2
Compiling backtrace v0.3.40
Compiling proc-macro-error v0.2.6
Compiling synstructure v0.12.1
Compiling structopt-derive v0.3.3
Compiling failure v0.1.6
Compiling structopt v0.3.3
Compiling opener-bin v0.1.0 (/home/archangel/Code/Rust/opener/opener-bin)
Finished dev [unoptimized + debuginfo] target(s) in 28.58s
Running `/home/archangel/Code/Rust/opener/target/debug/opener-bin index.html`
Opened path successfully.
but still this doesnt
rustup doc --std
▶ rustup component add rust-docs
info: component 'rust-docs' for target 'x86_64-unknown-linux-gnu' is up to date
▶ uname -r; pacman -Q linux
5.3.6-arch1-1-ARCH
linux 5.3.7.arch1-1
▶ rustup --version
rustup 1.20.2 (13979c968 2019-10-16)
from opener.
@japrogramer to be clear, the first set of commands opens your browser? If so, can you check if this command opens the docs in your browser (make sure to run on the master
branch):
cargo run -- $(rustup doc --std --path)
If all these commands work fine, then maybe the problem really is in rustup.
from opener.
Yes they work, But the rustup doc command doesn't
Here the index page i created works and the one pointing to std doesnt
Rust/opener/opener-bin master ✗ 18d ◒ ⍉
▶ cargo run -- index.html ∞
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `/home/archangel/Code/Rust/opener/target/debug/opener-bin index.html`
Opened path successfully.
Rust/opener/opener-bin master ✗ 18d ◒
▶ cargo run -- $(rustup doc --std --path) ∞
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `/home/archangel/Code/Rust/opener/target/debug/opener-bin /home/archangel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html`
Opened path successfully.
Rust/opener/opener-bin master ✗ 18d ◒
▶ rustup doc --std --path ∞
/home/archangel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html
both files have the same permissions, and the std/index.html does have content
from opener.
Works
strace -f -s100 cargo run -- index.html &> ~/errors.txt
Doesn't work
strace -f -s100 cargo run -- $(rustup doc --std --path) &> ~/errors2.txt
works
firefox $(rustup doc --std --path)
from opener.
Same issue here, the following works
firefox $(rustup doc --path)
but not
firefox $(rustup doc)
which opens KTorrent for me. I followed some instructions from rustup doc
appears to do nothing #1125, by removing
[Default Applications]
text/html=ktorrent.desktop
from ~/.config/mimeapps.list
and replacing it with text/html=firefox.desktop
but it didn't fix the issue.
My config:
5.5.3-arch1-1
linux 5.5.3.arch1-1
rustup 1.21.1 (2020-01-25)
rust-docs up to date
from opener.
I was never able to reproduce this issue locally, unfortunately. Anyways, I released v0.5 of this crate about two weeks ago, and it changes the strategy on Linux such that the system xdg-open
is tried first if available. I'd like to know if this is still a problem with the new version. Note that a version of Rustup with the updated opener
version still hasn't shipped, so to test this, a procedure like I described in #4 (comment) can be used.
from opener.
as asked in here, i'll respond to this.
I use WSL, and xdg-open-wsl (which i can call with xdg-open
on my system
from opener.
@Erudyx Ah, WSL should work fine with the release of v0.5. Still, if you want to confirm it's fixed now you can run what I posted above:
git clone https://github.com/Seeker14491/opener.git
cd opener/opener-bin/
echo 'Hello' > index.html
cargo run -- index.html
from opener.
Its working fine, but i dont i dont know why rustup doc --book
does nothing... no error printed, return 0...
from opener.
Related Issues (20)
- please include LICENSE files into the repo and all crates HOT 3
- opener::OpenError should implement std::error::Error
- On macOS, `opener` uses Safari where as the `open` command uses Firefox HOT 2
- Browser doesn't open on WSL2 HOT 2
- 0.4 doesn't seem to use either BROWSER or the default-browser from XDG. HOT 2
- Open in named tab for URL HOT 1
- Not enough context in error messages HOT 1
- Switch the backend on Linux (and WSL) from xdg-open to handlr
- published crates don't contain license texts but only contain bogus symlink HOT 2
- Reveal file in file explorer HOT 1
- Opening links doesn't work on WSL when using wslview
- URL opened as file path in WSL2 HOT 4
- Support WSL without requiring `wslview` or `xdg-open` HOT 5
- Issue opening file in Flatpak-based browser HOT 2
- docs.rs failed to build docs HOT 1
- `opener::open` does not fail at all, even when e.g. file is missing on Linux HOT 5
- Android support?
- "Reveal" feature causes the app to segfault on linux in some cases HOT 11
- How to open a folder on windows and focus it? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opener.