@cenk1cenk2/oclif-common 6.3.5 → 6.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -390,7 +390,7 @@ declare abstract class Command<T extends typeof Command$1 = typeof Command$1, Ct
390
390
  /** Initial functions / constructor */
391
391
  protected init(): Promise<void>;
392
392
  /** Tasks to run before end of the command. */
393
- protected finally<C extends Ctx = Ctx>(): Promise<{
393
+ protected finally<C extends Ctx = Ctx>(err: Error | undefined): Promise<{
394
394
  ctx: C;
395
395
  }>;
396
396
  /** Catch any error occurred during command. */
package/dist/index.js CHANGED
@@ -1827,8 +1827,13 @@ var _Command = class _Command extends BaseCommand {
1827
1827
  }
1828
1828
  }
1829
1829
  /** Tasks to run before end of the command. */
1830
- async finally() {
1830
+ async finally(err) {
1831
1831
  let ctx;
1832
+ if (err) {
1833
+ return {
1834
+ ctx
1835
+ };
1836
+ }
1832
1837
  if (this.tasks?.tasks?.length > 0) {
1833
1838
  this.logger.stage("Running tasks.");
1834
1839
  ctx = await this.runTasks();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/oclif-common",
3
- "version": "6.3.5",
3
+ "version": "6.3.6",
4
4
  "description": "Oclif common package for oclif2 projects.",
5
5
  "repository": "https://gitlab.kilic.dev/libraries/oclif-tools",
6
6
  "type": "module",