[FIX] base: avoid traceback when rendering traceback

If node is not installed (missing dependency), the user is not aware of the
source of the issue as it can not be displayed in the css_errors or logger.
The error is
/usr/bin/env: ‘node’: No such file or directory
which contains unicode quotes.

Does not fix #15057 but at least say the source of the problem.
This commit is contained in:
Martin Trigaux
2017-01-16 14:50:20 +01:00
parent 4b500aa298
commit d126529d1b
+1 -1
View File
@@ -390,7 +390,7 @@ class AssetsBundle(object):
def get_preprocessor_error(self, stderr, source=None):
"""Improve and remove sensitive information from sass/less compilator error messages"""
error = stderr.split('Load paths')[0].replace(' Use --trace for backtrace.', '')
error = misc.ustr(stderr).split('Load paths')[0].replace(' Use --trace for backtrace.', '')
if 'Cannot load compass' in error:
error += "Maybe you should install the compass gem using this extra argument:\n\n" \
" $ sudo gem install compass --pre\n"