pslua opens the output file via withFile WriteMode (exe/Main.hs) without creating its parent directory. If --lua-output-file dist/X.lua is passed and dist/ does not exist, it aborts with withFile: does not exist (No such file or directory).
Surfaced in purescript-lua-assert, whose scripts/build writes into a gitignored/absent dist/ (worked around there with mkdir -p dist; see #59). Hardening pslua to createDirectoryIfMissing True (takeDirectory out) would remove a sharp edge every fork's build script otherwise has to handle.
Low severity, trivial fix.
pslua opens the output file via
withFile WriteMode(exe/Main.hs) without creating its parent directory. If--lua-output-file dist/X.luais passed anddist/does not exist, it aborts withwithFile: does not exist (No such file or directory).Surfaced in purescript-lua-assert, whose
scripts/buildwrites into a gitignored/absentdist/(worked around there withmkdir -p dist; see #59). Hardening pslua tocreateDirectoryIfMissing True (takeDirectory out)would remove a sharp edge every fork's build script otherwise has to handle.Low severity, trivial fix.