Skip to content

Avoid installing across filesystem boundaries#14

Merged
wagoodman merged 1 commit intomainfrom
fix-move-to-copy
Dec 19, 2023
Merged

Avoid installing across filesystem boundaries#14
wagoodman merged 1 commit intomainfrom
fix-move-to-copy

Conversation

@wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Dec 18, 2023

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

@wagoodman wagoodman added the bug Something isn't working label Dec 18, 2023
@wagoodman wagoodman requested a review from a team December 18, 2023 14:23
@wagoodman wagoodman force-pushed the fix-move-to-copy branch 2 times, most recently from 43f33f1 to 1ad6a8d Compare December 18, 2023 17:51
@wagoodman wagoodman changed the title Support installing across filesystem boundaries Prevent installing across filesystem boundaries Dec 18, 2023
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman changed the title Prevent installing across filesystem boundaries Avoid installing across filesystem boundaries Dec 18, 2023
@wagoodman wagoodman merged commit c51f257 into main Dec 19, 2023
@wagoodman wagoodman deleted the fix-move-to-copy branch December 19, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants