Skip to content

Commit 2e33e65

Browse files
committed
Allow errors from appservice cli to propagate to the top level.
1 parent 0ede5c8 commit 2e33e65

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/appservice/cli.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import { Cli } from "matrix-appservice-bridge";
1212
import { MjolnirAppService } from "./AppService";
13-
import { Task } from "matrix-protection-suite";
1413
import { AppserviceConfig } from "./config/config";
1514
import { Value } from "@sinclair/typebox/value";
1615

@@ -32,16 +31,12 @@ const cli = new Cli({
3231
if (config === null) {
3332
throw new Error("Couldn't load config");
3433
}
35-
void Task(
36-
(async () => {
37-
await MjolnirAppService.run(
38-
port,
39-
// we use the matrix-appservice-bridge library to handle cli arguments for loading the config
40-
// but we have to still validate it ourselves.
41-
Value.Decode(AppserviceConfig, config),
42-
cli.getRegistrationFilePath()
43-
);
44-
})()
34+
void MjolnirAppService.run(
35+
port,
36+
// we use the matrix-appservice-bridge library to handle cli arguments for loading the config
37+
// but we have to still validate it ourselves.
38+
Value.Decode(AppserviceConfig, config),
39+
cli.getRegistrationFilePath()
4540
);
4641
},
4742
});

0 commit comments

Comments
 (0)