feat(lib): rename tool_storage dir

Tools are now stored in the `~/.pesde/bin/.tool_storage` directory, in
order to prevent naming conflicts with other tool linkers. An old
tool_storage directory gets migrated to the new path if present.
This commit is contained in:
Erica Marigold 2024-12-13 18:20:29 +00:00
parent 202dc85147
commit 0726169df8
Signed by: DevComp
GPG key ID: 429EF1C337871656

View file

@ -88,7 +88,12 @@ local function stripLeadingVersion(version: string): string
end
local LINK_INSTALL_DIR = (dirs.homeDir() or error("Couldn't get home dir :(")):join(".pesde"):join("bin")
local TOOL_STORAGE_DIR = LINK_INSTALL_DIR:join("tool_storage")
local TOOL_STORAGE_DIR = LINK_INSTALL_DIR:join(".tool_storage")
local OLD_TOOL_STORAGE_DIR = LINK_INSTALL_DIR:join("tool_storage")
if pathfs.isFile(OLD_TOOL_STORAGE_DIR) then
pathfs.move(OLD_TOOL_STORAGE_DIR, TOOL_STORAGE_DIR)
end
local bar = ProgressBar.new()
:withStage("init", "Initializing")