From ff769a31b09487379116b4098c5456b6cb8a0bb8 Mon Sep 17 00:00:00 2001 From: Yura Lazarev Date: Sun, 14 Jun 2026 10:34:15 +0200 Subject: [PATCH] fix(build): create dist/ before running pslua backend scripts/build ran spago build, which invokes the pslua backend from spago.dhall with --lua-output-file dist/Test_Assert.lua. pslua opens that file with withFile WriteMode, which does not create parent directories. dist/ is gitignored and absent on a fresh checkout, so the build failed with 'dist/Test_Assert.lua: withFile: does not exist'. Create dist/ with mkdir -p before spago build so the output directory always exists, matching the intent of the sibling Lua forks. Closes Unisay/purescript-lua-assert#1 --- scripts/build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/build b/scripts/build index a75a55a..bc008fd 100755 --- a/scripts/build +++ b/scripts/build @@ -2,4 +2,9 @@ echo "Building..." +# pslua writes --lua-output-file dist/Test_Assert.lua with withFile WriteMode, +# which does not create parent directories. dist/ is gitignored and absent on a +# fresh checkout, so ensure it exists before spago build runs the pslua backend. +mkdir -p dist + spago build --quiet