Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo doc --open doesn't work on WSL2 #12372

Closed
abhiramiyer opened this issue Jul 18, 2023 · 1 comment · Fixed by #12373
Closed

cargo doc --open doesn't work on WSL2 #12372

abhiramiyer opened this issue Jul 18, 2023 · 1 comment · Fixed by #12373
Labels
C-bug Category: bug Command-doc O-windows OS: Windows S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@abhiramiyer
Copy link
Contributor

abhiramiyer commented Jul 18, 2023

Problem

expected behavior: cargo doc --open should open the generated documentation using the default browser

observed behavior: cargo doc --open fails with an error:

 Finished dev [unoptimized + debuginfo] target(s) in 0.19s
     Opening /home/aiyer/workspace/cargo/target/doc/cargo/index.html
warning: couldn't open docs

command 'wslview' did not execute successfully; exit status: 1
command stderr:
Start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:128
+ ... oding(437); Start "wsl.localhostUbuntuhomeaiyerworkspacecargo ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Steps

No response

Possible Solution(s)

The issue is due to a bug in the 'opener' crate (v0.5.2). Please see Seeker14491/opener#19. This is fixed in v0.6.1. Updating to this version resolves the issue ( abhiramiyer@04e5675).

Notes

No response

Version

cargo 1.70.0 (ec8a8a0ca 2023-04-25)
release: 1.70.0
commit-hash: ec8a8a0cabb0e0cadef58902470f6c7ee7868bdc
commit-date: 2023-04-25
host: x86_64-unknown-linux-gnu
libgit2: 1.6.3 (sys:0.17.0 vendored)
libcurl: 8.0.1-DEV (sys:0.4.61+curl-8.0.1 vendored ssl:OpenSSL/1.1.1t)
os: Ubuntu 22.04 (jammy) [64-bit]
@abhiramiyer abhiramiyer added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jul 18, 2023
@weihanglo weihanglo added Command-doc O-windows OS: Windows S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review and removed S-triage Status: This issue is waiting on initial triage. labels Jul 18, 2023
@weihanglo
Copy link
Member

Thanks @abhiramiyer, and feel free to open a PR to fix it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug Command-doc O-windows OS: Windows S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants