Skip to content

Commit d32878c

Browse files
🐛 Fixed a bug where project names with multiple segments could not be built.
1 parent 501d0d4 commit d32878c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lustre/dev.gleam

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ key `tools.lustre.build.outdir`.
281281
let name = justin.snake_case(entry) <> ".mjs"
282282
let path = filepath.join(project.build, name)
283283

284+
use _ <- result.try(
285+
simplifile.create_directory_all(filepath.directory_name(path))
286+
|> result.map_error(error.CouldNotWriteFile(
287+
filepath.directory_name(path),
288+
_,
289+
)),
290+
)
291+
284292
use _ <- result.try(
285293
simplifile.write(path, module)
286294
|> result.map_error(error.CouldNotWriteFile(path, _)),

0 commit comments

Comments
 (0)