Description
- Deprecate
FilesystemImporter.cwd
(Better handle filesystem importers when load paths aren't necessary #2203) - Remove
FilesystemImporter.cwd
Hi,
I've run into a problem when using the --update
flag with the cli and specifying an absolute path for the source file/directory. It seems to always update the output .css file(s) even if the scss file hasn't changed. This is causing a problem in a project that I maintain which integrates the dart-sass executable in a C#/ASP.NET Core application. This project is using the dart vm version which we download directly from the GitHub release assets.
I've tried the following to come to the conclusion that it has something to do with specifying an absolute path for the source file/folder (I only tested this on Linux):
- Create a .scss file in a folder (doesn't have to contain anything special, can just be valid css)
- Run
sass folder:folder --update
, this works as expected and only updates the css when the scss has changed - Run
sass /absolute/path/to/folder:/absolute/path/to/folder --update
orsass /absolute/path/to/folder:folder --update
, this will always update the output .css file - Run
sass folder:/absolute/path/to/folder --update
, this works as expected and only updates the css when the scss changes.
Interestingly, if I specify a folder as a source and run the command multiple times it also tries to (re)compile the css file that was generated the first time. This succeeds only some of the time and fails with an error other times.
I've tried it on multiple older versions and it seems to happen since version 1.67.0. In version 1.66.1 it does work correctly.
Thanks in advance!