anchore / binny

Manage a directory of binaries without a package manager
Apache License 2.0
21 stars 1 forks source link

Avoid installing across filesystem boundaries #14

Closed wagoodman closed 9 months ago

wagoodman commented 9 months ago

It was reported on slack that using binny didn't work and failed with an error invalid cross-device link

image

This is because os.Rename was used when moving the temp directory that contains a new tool installation to the final destination within the store. I attempting using a copy first instead of a move, however, if the binary in question is still in use, then you will see an error text in busy. Instead the change is to use a tmp directory path to be within the store path itself, so that os.Rename can still be used.

CC: @brian-ebarb