Skip to content

Commit e42669a

Browse files
committed
Bumped version to fix homebrew packaging issue
1 parent d1a3240 commit e42669a

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

src/cli.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,13 @@ try {
166166
.command("otp", otp)
167167
.command("start", daemon)
168168
.parse(Deno.args);
169-
} catch (error) {
170-
const status = error.code ? error.code : Status.GENERIC_ERROR;
171-
console.log(
172-
JSON.stringify({ error: error.message, status, results: [] }),
173-
);
169+
} catch (error: unknown) {
170+
let status = Status.GENERIC_ERROR;
171+
let msg = "Unknown Error";
172+
if (error instanceof APWError || error instanceof Error) {
173+
status = error instanceof APWError ? error.code : status;
174+
msg = error.message;
175+
}
176+
console.error(JSON.stringify({ error: msg, status, results: [] }));
174177
Deno.exit(status);
175178
}

src/const.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const DATA_PATH = `${Deno.env.get("HOME")}/.apw`;
22

3-
export const VERSION = "1.0.0";
3+
export const VERSION = "1.0.1";
44

55
export class APWError extends Error {
66
code: Status;

tsconfig.json

-21
This file was deleted.

0 commit comments

Comments
 (0)