Skip to content

Inappropriate handling of environment variable LD_LIBRARY_PATH in README. #2923

@taro-yamada

Description

@taro-yamada

I'm sorry, this is a very trivial thing.

README.md said

If you get an error like error while loading shared libraries while starting up rustfmt you should try the following:
On Linux:
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib:$LD_LIBRARY_PATH

In this case, if LD_LIBRARY_PATH is empty, the current directory will be included in LD_LIBRARY_PATH and causes potential security problems.

I think that it is good to do as following.
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssues up for grabs, also good candidates for new rustfmt contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions