Incorrect report of non-executable rustup-init binary in latest Ubuntu Docker container: "Please copy the file to a location where you can execute binaries and run ./rustup-init"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem
rustup-init.sh reports "Please copy the file to a location where you can execute binaries and run ./rustup-init", however when I ls the file (and furthermore, try to execute it), it is indeed executable.
This started happening in the ubuntu:21.04 Docker container with image hash: 1fc773f9e714.
Steps
- docker run --rm -it ubuntu@sha256:2fc51f401cb873bfec33022d065efacbaf868b2e23f4dd76d7230d129258e255 bash
- apt update && apt install curl -y
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Possible Solution(s)
I added set -x to the downloaded script, and did not see anything obvious, though it does seem fairly evident that the call to test -x "$_file" is incorrectly reporting that the file is not executable: ls -l $_file shows that the file is indeed executable, and I am able to run the file manually. 🤷
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the listed ubuntu:21.04 Docker command and inspect the downloaded rustup-init.sh around its test -x "$_file" check. Compare that check with ls output and manual execution in the same container. Done means the installer no longer reports an executable rustup-init binary as non-executable, with the reproduction verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, rust, shell, ubuntu
- Domain
- devops, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100