question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to exit process with error code from a plugin?

See original GitHub issue

for example:

import { CLIEngine } from 'eslint';

export async function eslint() {
    await this.defer((options, done) => {
        const cli = new CLIEngine();

        const report = cli.executeOnFiles([ '.' ]);
        const formatter = cli.getFormatter();

        this.log(formatter(report.results));

        if (report.errorCount > 0) {
            done(`${report.errorCount} error(s)`);
        }

        done();
    })();
}

there is no “real” error, only failing log, so my git hook doesn’t recognize an error. even process.exit(1) doesn’t work o_O are you using some kind of process spawn inside?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeedcommented, Mar 20, 2016

Yes, related. Let’s do something about this

1reaction
ghostcommented, Mar 20, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in plugin appears to make watcher process exit ... - GitHub
When using rollup-watch directly, without the CLI (which I am doing because I need events to fire in response to build events), errors...
Read more >
exec maven plugin: exit code - Stack Overflow
It does fail the execution process and tells me the error (since I have set -e command in the .sh script), however maven...
Read more >
Troubleshoot plug-ins - Power Apps - Microsoft Learn
Error Message: The plug-in execution failed because the Sandbox Worker process crashed. This is typically due to an error in the plug-in code....
Read more >
Process exit code: 1 - Deadline - Thinkbox Forums
I want to write a custom Deadline Plugin that could be used to open an existent AfterEffects comp file (aep) and read the...
Read more >
Failing with exit code : Generic Error - Snyk Support
On typical Unix and Linux systems, programs can pass a value to their parent processes while terminating. Values like these are referred to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found