Skip to content

build: fix sass async worker patch causing successful builds to fail #18260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tools/bazel/sass_worker_async.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
diff --git sass/sass_wrapper.js sass/sass_wrapper.js
index 21abb8f..168ee49 100644
index 21abb8f..9c750a3 100644
--- sass/sass_wrapper.js
+++ sass/sass_wrapper.js
@@ -17,7 +17,9 @@ const fs = require('fs');
@@ -17,7 +17,11 @@ const fs = require('fs');
const args = process.argv.slice(2);
if (runAsWorker(args)) {
debug('Starting Sass compiler persistent worker...');
- runWorkerLoop(args => sass.run_(args));
+ runWorkerLoop(args => {
+ return new Promise((resolve, reject) => sass.run_(args)['then$1$2$onError'](resolve, reject));
+ return new Promise(resolve => {
+ sass.run_(args)['then$1$2$onError'](() => resolve(true), () => resolve(false));
+ });
+ });
// Note: intentionally don't process.exit() here, because runWorkerLoop
// is waiting for async callbacks from node.
Expand Down