kcl mod pull
fails across filesystem boundaries
#1775
Labels
Milestone
kcl mod pull
fails across filesystem boundaries
#1775
Bug Report
When trying to run
kcl mod pull
where/tmp
is on a different filesystem to the module being built, the pull command fails withinvalid cross-device link
I believe that this comes from
kcl/kclvm/runtime/src/file/mod.rs
Line 247 in 367cba9
however
fs::rename
does not work across filesystem boundaries as it only performs a simple rename, leaving the data in place on disk rather than completely moving it to the new location.1. Minimal reproduce step (Required)
The simplest way to test this is to run KCL in a docker container using a bind mount to the local directory
2. What did you expect to see? (Required)
The
k8s
module should be added atoci/ghcr.io/kcl-lang/k8s
3. What did you see instead (Required)
The pull command fails with
invalid cross-device link
4. What is your KCL components version? (Required)
N/A
EDIT:
Note
Whilst this can be mitigated by setting the value of
TMPDIR
to a location on the same filesystem as the current module, this feels more like a workaround than a viable long term solution.For example, the following works:
The text was updated successfully, but these errors were encountered: