Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
runWorkerLoop(args => sass.cli_pkg_main_0_(args));
// Note: intentionally don't process.exit() here, because runWorkerLoop
runWorkerLoop(args => sass.cli_pkg_main_0_(args));
// Note: intentionally don't process.exit() here, because runWorkerLoop
// is waiting for async callbacks from node.
} else {
debug('Running a single build...');
if (args.length === 0) throw new Error('Not enough arguments');
if (args.length !== 1) {
throw new Error('Expected one argument: path to flagfile');
}
// Bazel worker protocol expects the only arg to be @.
// When we are running a single build, we remove the @ prefix and read the list
// of actual arguments line by line.
const configFile = args[0].replace(/^@+/, '');
const configContent = fs.readFileSync(configFile, 'utf8').trim();
sass.cli_pkg_main_0_(configContent.split('\n'));
}
process.exitCode = 0;