cre update fails with "invalid cross-device link" when /tmp and install dir are on different partitions
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start at the cre update command's binary replacement logic and locate its os.Rename call. Reproduce the failure with /tmp and the installation directory on different partitions, then verify that the update completes without the cross-device-link error while preserving the existing replacement behavior.
Written by the indexing model from the issue text.
Description
The cre update command fails to complete the update process because it attempts a rename operation across different device boundaries. This is a common issue when /tmp is mounted as a tmpfs or is on a separate partition from the user's home/installation directory.
Error Output:
Updating cre CLI...
Downloading: https://github.com/smartcontractkit/cre-cli/releases/download/v1.0.7/cre_linux_amd64.tar.gz
Error: failed to replace binary: rename /tmp/cre_update_3483520469/cre_v1.0.7_linux_amd64 /root/.cre/bin/cre: invalid cross-device link
Environment:
- OS: Debian (Linux)
- Version: upgrading from v1.0.6 to v1.0.7
- Install Path: /root/.cre/bin/cre
Suggested Fix: In the update logic, if os.Rename fails with an EXDEV error (invalid cross-device link), the tool should fall back to copying the file contents and then deleting the source, or use a temporary directory located on the same partition as the target binary.
- Dominant language
- Go
- Stars
- 24
- Forks
- 25
- Avg merge
- 10h 10m
- Merged PRs (30d)
- 13
Contributor guide
No contributing guide indexed for this repository
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.
More from smartcontractkit/cre-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
smartcontractkit/cre-cli#430 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
smartcontractkit/cre-cli#582 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
smartcontractkit/cre-cli#569 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
smartcontractkit/cre-cli#507 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
smartcontractkit/cre-cli#393 ·
All issues in smartcontractkit/cre-cli
Similar issues
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
🤔 refinement needed
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
equinor/radix-operator#1979 ·