Skip to content

Prefer creating temporary files in the stdout_captured directory, rather than the infile's #836

@pplatanias

Description

@pplatanias

The current behavior of the less Compiler causes errors in workflows where the user running the collecstatic step does not have write permissions to the source folders containing the less files.

The SubProcessCompiler writes temporary files during compilation. It uses the following preference for location:

cwd or os.path.dirname(stdout_captured or "") or os.getcwd()

where cwd is (for the less, sass and stylus compilers) the location of the source files:
command, cwd=dirname(infile), stdout_captured=outfile

However, isn't it safer to prefer the stdout_captured location over the source for the temporary files if both are provided, as there is a better chance the compiler will have write permissions there?

There is an old PR about the same issue, though its approach is different: #741

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions