diff --git a/src/config.ts b/src/config.ts index 09138be1..5c99756f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -209,7 +209,7 @@ export class Config implements IConfig { return Object.values(m).find((m: any) => typeof m === 'function') as Hook } - await search(require(p)).call(context, opts) + await search(require(p)).call(context, {...opts as any, config: this}) } catch (err) { if (err && err.anycli && err.anycli.exit !== undefined) throw err this.warn(err, `runHook ${event}`)