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

Fix man proxy in FreeBSD #1725

Merged
merged 1 commit into from
Mar 28, 2019
Merged

Fix man proxy in FreeBSD #1725

merged 1 commit into from
Mar 28, 2019

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Mar 24, 2019

In FreeBSD, man command only searches for man files in MANPATH.
Which means that FreeBSD man program does not accept interpret local man files.

On Bash-compatible shell, one could use this command to open rust specific manpages:

env MANPATH=$HOME/.rustup/toolchains/stable-x86_64-unknown-freebsd/share/man man rustc

Locally tested on:

  • Ubuntu
  • FreeBSD 11

r? @kinnison

Note: Ping me if someone needs to squash this PR.

src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, though I'm loathe to approve because -M overrides the MANPATH environment variable which might also be set and relevant. I'd be more comfortable with manipulating that than passing -M

src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
@tesuji
Copy link
Contributor Author

tesuji commented Mar 26, 2019

@kinnison So you want to manipulate MANPATH env var via Command::env?

@kinnison
Copy link
Contributor

I figure that if MANPATH is set, we have to do that to be correct (i.e. prepend our path onto MANPATH) If it's not set, we could use -M but at that point the code is simpler to always prepend to MANPATH

@tesuji
Copy link
Contributor Author

tesuji commented Mar 27, 2019

@kinnison I pushed the change you requested.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. Have you verified it against FreeBSD and at least one Linux?

@kinnison
Copy link
Contributor

If so, please rebase to clean up the history of the branch before I merge.

@tesuji
Copy link
Contributor Author

tesuji commented Mar 27, 2019

@kinnison I tested on Ubuntu. FreeBSD I only test the equivalent shell command.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kinnison kinnison merged commit 291900e into rust-lang:master Mar 28, 2019
@tesuji tesuji deleted the man branch March 28, 2019 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants