diff --git a/src/spm/spm.lua b/src/spm/spm.lua index daa190f..a05125b 100644 --- a/src/spm/spm.lua +++ b/src/spm/spm.lua @@ -430,11 +430,14 @@ local function installPackage(requestedPackage, installPath, doUpdate) installedPath = fs.concat(installPath, requestedInstallPath, string.gsub(filePath, ".+(/.-)$", "%1"), nil) end + local downloadPath if packageInfo.minified or options.m then - filePath = string.gsub(filePath, "(.+)%.lua$", "%1") .. ".min.lua" + downloadPath = repositoryPath .. "/" .. string.gsub(filePath, "(.+)%.lua$", "%1") .. ".min.lua" + else + downloadPath = repositoryPath .. "/" .. filePath end - local success = pcall(downloadFile, repositoryPath .. "/" .. filePath, installedPath) + local success = pcall(downloadFile, downloadPath, installedPath) if success then locallyInstalledPackages[requestedPackage][filePath] = installedPath end