Skip to content

rustup-init should detect early if /proc isn't mounted #2654

@joshtriplett

Description

@joshtriplett

Running rustup-init.sh without /proc mounted produces many errors before finally explaining the issue:

head: cannot open '/proc/self/exe' for reading: No such file or directory
rustup: unknown platform bitness
./rustup-init.sh: 338: [: Illegal number: 
info: downloading installer
error: Unable to proceed. Could not locate working directory.
error: caused by: no /proc/self/exe available. Is /proc mounted?

All of these ultimately come from the same cause. Rather than proceeding and encountering issues like [: Illegal number, I think it would make sense to detect early in the script if /proc isn't mounted (such as with test -L /proc/self/exe) and error out at that point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions