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

@lzutao
Copy link
Contributor

lzutao 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
Collaborator

kinnison left a comment

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
@lzutao

This comment has been minimized.

Copy link
Contributor Author

lzutao commented Mar 26, 2019

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

@kinnison

This comment has been minimized.

Copy link
Collaborator

kinnison commented Mar 26, 2019

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

@lzutao

This comment has been minimized.

Copy link
Contributor Author

lzutao commented Mar 27, 2019

@kinnison I pushed the change you requested.

Copy link
Collaborator

kinnison left a comment

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

@kinnison

This comment has been minimized.

Copy link
Collaborator

kinnison commented Mar 27, 2019

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

@lzutao lzutao force-pushed the lzutao:man branch from bea915a to ea4ddc3 Mar 27, 2019
@lzutao lzutao force-pushed the lzutao:man branch from ea4ddc3 to c24c664 Mar 27, 2019
@lzutao

This comment has been minimized.

Copy link
Contributor Author

lzutao commented Mar 27, 2019

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

Copy link
Collaborator

kinnison left a comment

LGTM

@kinnison kinnison merged commit 291900e into rust-lang:master Mar 28, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@lzutao lzutao deleted the lzutao:man branch Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.