Skip to content

Commit 5a134fb

Browse files
committed
fix directory handling
1 parent 6a3b9df commit 5a134fb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lute/cli/commands/pkg/loom-core/src/github.luau

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
local authenticationStore = require("./authenticationstore")
22
local fs = require("@std/fs")
33
local net = require("@std/net")
4+
local path = require("@std/path")
45
local process = require("@std/process")
56
local projectmanifest = require("./projectmanifest")
67
local unzip = require("../extern/unzip")
@@ -69,6 +70,7 @@ local function installZipArchive(content: string, installPath: string)
6970
assert(slash, `Expected entry name to contain a slash: {sanitized}`)
7071

7172
local outputPath = `{installPath}/{string.sub(sanitized, slash)}`
73+
fs.createDirectory(path.dirname(outputPath), { makeParents = true })
7274
fs.writeStringToFile(outputPath, content)
7375
end)
7476
end

lute/cli/commands/pkg/loom-core/src/packageresolution.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ local function resolve(rootDirectory: string): ResolvedGraph
6363
-- for now, just clear the installation directory if it exists
6464
local rootInstallPath = `{rootDirectory}/{getInstallPath("")}`
6565
if fs.exists(rootInstallPath) then
66-
fs.remove(rootInstallPath)
66+
fs.removeDirectory(rootInstallPath, { recursive = true })
6767
end
6868

6969
local queue: { projectmanifest.DependencySpec } = {}

0 commit comments

Comments
 (0)