We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12facc2 commit 38faa16Copy full SHA for 38faa16
1 file changed
src/kernel.ts
@@ -172,13 +172,15 @@ export class Kernel {
172
return false;
173
}
174
175
- init.completion.then((exit_code) => {
+ try {
176
+ const exit_code = await init.completion;
177
+
178
this.panic(`init program ${init_program} exited ${exit_code === 0 ? "unexpectedly" : "with an error"}!`, `Exit code: ${exit_code}`);
179
- }).catch((e) => {
180
+ } catch (e) {
181
this.panic(`init program ${init_program} error!`, e.toString());
182
- });
183
+ }
184
} catch (e) {
185
this.panic(`Failed to start init program ${init_program}!`, e.toString());
186
0 commit comments