message: feat(service:check): add null check for `ctx` in `runTasks`
diff: @@ -217,7 +217,12 @@ export abstract class ProjectCommand extends Command {
  generateTasks: (context: ProjectContext) => ListrTask[],
  options?: Listr.ListrOptions | ((ctx: ProjectContext) => Listr.ListrOptions)
  ): Promise<Result> {
  - const tasks = await generateTasks(this.ctx!);
  + const { ctx } = this;
  + if (!ctx) {
  + throw new Error("init must be called before trying to access this.ctx");
  + }
  +
  + const tasks = await generateTasks(ctx);
  return new Listr(
  [...this.tasks, ...tasks],
  typeof options === "function" ? options(ctx) : options
  