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
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:
django-pipeline/pipeline/compilers/__init__.py
Line 129 in f36dbe0
where cwd is (for the less, sass and stylus compilers) the location of the source files:
django-pipeline/pipeline/compilers/less.py
Line 21 in f36dbe0
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