weixu365 / serverless-scriptable-plugin

Adding script support to Serverless 1.x which enables you to customize Serverless behavior without writing a plugin.
MIT License
112 stars 11 forks source link

Stacktrace to `runCommand` should not be printed when command fails #187

Closed ZainlessBrombie closed 1 year ago

ZainlessBrombie commented 1 year ago

When the runCommand exits with a non-zero exit code, an Exception occurs. This exception is not caught, resulting in a long stacktrace in the console, that only points to this plugin itself.
I think the error resulting from execSync should be caught and a simple message Command <command> should be printed. Then the serverless process that triggered the hook should be stopped.

Use case: linting automatically before a deploy/package

weixu365 commented 1 year ago

That's a good suggestion. Thanks for the feedback.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.3.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

ZainlessBrombie commented 1 year ago

That was quick
Thank you very much! :)