Bug(v0.9.0-rc): Downloading modules fails with /tmp on tmpfs #370
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Bug Report
1. Minimal reproduce step (Required)
Use the kcl cli and have on linux /tmp on a tmpfs (or any filesystem separate from where the cli will be executed)
kcl mod init && kcl mod add k8s
Relevant excerpt from
mount
:tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
2. What did you expect to see? (Required)
No error ;)
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
kcl cli is
0.9.0-rc.1-linux-amd64
5. Error origin
The bug originates from here.
os.Rename
is just a thin wrapper aroundsyscall.Rename
which errors if source and destination are not on the same filesystem.Possible quickfixes that I see after glancing over it:
/tmp
present.errors.Is(syscall.EXDEV)
check and fallback to copying. This of course looses the integrity guarantees renaming brings for systems where/tmp
is not on the same filesystem.The text was updated successfully, but these errors were encountered: