Skip to content

Commit

Permalink
refactor(core): modifies error messages regarding local instances mis…
Browse files Browse the repository at this point in the history
…match
  • Loading branch information
rafamel committed May 3, 2019
1 parent 04a93b8 commit 490fed7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/core/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ export async function requireLocal(
const local = errors.open.throws(() => require(kpoPath as string));

if (!local || !local.core || !local.core.version) {
throw Error(
"Locally imported kpo version doesn't match executing instance version"
);
throw Error(`Local kpo version doesn't match executing instance version`);
}

const localVersion = await local.core.version();
Expand All @@ -106,7 +104,7 @@ export async function requireLocal(
(verDiff && version[0] === '0')
) {
throw Error(
`Locally imported kpo version (${localVersion})` +
`Local kpo version (${localVersion})` +
` doesn't match executing instance version (${version})`
);
}
Expand Down
4 changes: 1 addition & 3 deletions src/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ function stripUndefined(obj: IOfType<any>): IOfType<any> {

function verifyId(): void {
if (id !== process.env.KPO_STATE_ID) {
throw Error(
`Locally imported kpo instance doesn't match executing instance`
);
throw Error(`Local kpo instance doesn't match executing instance`);
}
}

0 comments on commit 490fed7

Please sign in to comment.