diff --git a/packages/imperative/src/cmd/__tests__/CommandProcessor.unit.test.ts b/packages/imperative/src/cmd/__tests__/CommandProcessor.unit.test.ts index 41cbc4ed0..d12b70126 100644 --- a/packages/imperative/src/cmd/__tests__/CommandProcessor.unit.test.ts +++ b/packages/imperative/src/cmd/__tests__/CommandProcessor.unit.test.ts @@ -199,7 +199,7 @@ describe("Command Processor", () => { arguments: { _: ["sample", "cmd", "--help"], $0: "", - valid: false + valid: true } }; @@ -207,7 +207,7 @@ describe("Command Processor", () => { arguments: { _: ["sample", "cmd", "--version"], $0: "", - valid: false + valid: true } }; diff --git a/packages/imperative/src/config/src/api/ConfigLayers.ts b/packages/imperative/src/config/src/api/ConfigLayers.ts index d5009f4f5..d54db1c8a 100644 --- a/packages/imperative/src/config/src/api/ConfigLayers.ts +++ b/packages/imperative/src/config/src/api/ConfigLayers.ts @@ -33,7 +33,7 @@ export class ConfigLayers extends ConfigApi { * @param opts The user and global flags that indicate which of the four * config files (aka layers) is to be read. */ - public read(opts?: { user: boolean; global: boolean; ignoreErrors: boolean}) { + public read(opts?: { user: boolean; global: boolean; ignoreErrors?: boolean}) { // Attempt to populate the layer const layer = opts ? this.mConfig.findLayer(opts.user, opts.global) : this.mConfig.layerActive(); if (fs.existsSync(layer.path)) { @@ -53,7 +53,7 @@ export class ConfigLayers extends ConfigApi { } catch (e) { const msg = `Error parsing JSON in the file '${layer.path}'.\n` + `Please check this configuration file for errors.\nError details: ${e.message}\nLine ${e.line}, Column ${e.column}`; - if (!opts.ignoreErrors){ + if (!opts?.ignoreErrors){ throw new ImperativeError({ msg:msg, suppressDump: true