lemonsaurus / django-simple-bulma

Django application to add the Bulma CSS framework and its extensions
MIT License
136 stars 16 forks source link

`_get_custom_css` results in `sass.CompileError` when `custom_scss` path is not found by finders #92

Open kbakk opened 2 years ago

kbakk commented 2 years ago

I have set Bulma settings to

BULMA_SETTINGS = {
    "custom_scss": [
        "cant/find/this.scss"
    ]
}

I expect to see ValueError: Unable to locate the SCSS file .... However I get an unhelpful sass.CompileError instead:

sass.CompileError: Error: File to import not found or unreadable: [].

It looks like this package has an helpful error that should be show, however

https://github.com/lemonsaurus/django-simple-bulma/blob/3e3eac809cb8f04ce2494a406ee375ea0dce63ae/django_simple_bulma/finders.py#L170

when this step is run, the value is an empty list [], so the comparison to None is evaluated as false.

Suggestion: Change expression to if not absolute_path (I can submit a PR with that if desired).