at-import / node-sass-import-once

Eyeglass style Import Once, but for all the things!
Other
94 stars 23 forks source link

Does not stop CI build if Could not import error #35

Closed AndyOGo closed 7 years ago

AndyOGo commented 7 years ago

I just realised that this does not properly throw or setting proper exit codes with process.exitCode if an import fails. Instead it just logs to the console:

Error: Could not import `module-does-not-exist` from any of the following locations:
  /frontend-lib/src/scss/module-does-not-exist.scss
  /frontend-lib/src/scss/module-does-not-exist.sass
  /frontend-lib/src/scss/_module-does-not-exist.scss
  /frontend-lib/src/scss/_module-does-not-exist.sass
  /frontend-lib/node_modules/@axa-ch/style-guide/scss/module-does-not-exist.scss
  /frontend-lib/node_modules/@axa-ch/style-guide/scss/module-does-not-exist.sass
  /frontend-lib/node_modules/@axa-ch/style-guide/scss/_module-does-not-exist.scss
  /frontend-lib/node_modules/@axa-ch/style-guide/scss/_module-does-not-exist.sass

This false behaivior is caused at the following lines:

Further more the done callback in above code blocks does not use first-error arguments.

AndyOGo commented 7 years ago

Error should be passed as described in https://github.com/sass/node-sass#importer--v200---experimental

AndyOGo commented 7 years ago

@Snugug Is this repo still maintained? I have opened a PR