Skip to content

pslua does not create the parent directory of --lua-output-file #61

@Unisay

Description

@Unisay

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions