@oclif/core 3.4.0 → 3.5.0

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/lib/command.d.ts CHANGED
@@ -97,7 +97,8 @@ export declare abstract class Command {
97
97
  code?: string;
98
98
  exit?: number;
99
99
  } & PrettyPrintableError): never;
100
- exit(code?: number): never;
100
+ exit(code: number): never;
101
+ exit(code: 0): void;
101
102
  protected finally(_: Error | undefined): Promise<any>;
102
103
  protected init(): Promise<any>;
103
104
  /**
@@ -5,7 +5,7 @@ export { CLIError } from './errors/cli';
5
5
  export { ExitError } from './errors/exit';
6
6
  export { ModuleLoadError } from './errors/module-load';
7
7
  export { handle } from './handle';
8
- export declare function exit(code?: number): never;
8
+ export declare function exit(code?: number): void;
9
9
  export declare function error(input: Error | string, options: {
10
10
  exit: false;
11
11
  } & PrettyPrintableError): void;
@@ -39,7 +39,9 @@ Object.defineProperty(exports, "ModuleLoadError", { enumerable: true, get: funct
39
39
  var handle_1 = require("./handle");
40
40
  Object.defineProperty(exports, "handle", { enumerable: true, get: function () { return handle_1.handle; } });
41
41
  function exit(code = 0) {
42
- throw new exit_1.ExitError(code);
42
+ if (code !== 0) {
43
+ throw new exit_1.ExitError(code);
44
+ }
43
45
  }
44
46
  exports.exit = exit;
45
47
  function error(input, options = {}) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "3.4.0",
4
+ "version": "3.5.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {