Skip to content

Commit

Permalink
fix: run init hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 7, 2018
1 parent e9a7b00 commit d902662
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export function command(args: string[] | string | undefined, opts: loadConfig.Op
async run(ctx: {config: Config.IConfig, expectation: string}) {
if (!ctx.config || opts.reset) ctx.config = loadConfig(opts).run({} as any)
args = castArray(args)
let [cmd, ...extra] = args
let [id, ...extra] = args
ctx.expectation = ctx.expectation || `runs ${args.join(' ')}`
await ctx.config.runCommand(cmd, extra)
await ctx.config.runHook('init', {id, argv: extra})
await ctx.config.runCommand(id, extra)
}
}
}
Expand Down

0 comments on commit d902662

Please sign in to comment.