Skip to content

Commit

Permalink
Fixing type issue introduced by commander fix (#179)
Browse files Browse the repository at this point in the history
## Description
When landing the commander v7 changes, turns out the types didn't match anymore with the new option added `groupSourceComments`
  • Loading branch information
gagoar authored Jan 22, 2021
1 parent 98df49c commit 1909a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/generate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('Generate', () => {
callback(null, content);
});

await generateCommand({ parent: {}, output: 'CODEOWNERS', groupSourceComments: true });
await generateCommand({ output: 'CODEOWNERS', groupSourceComments: true }, { parent: {} });
expect(writeFile.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
Expand Down
2 changes: 1 addition & 1 deletion src/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const command = async (options: Options, command: Command): Promise<void>

const loader = ora('generating codeowners...').start();

const groupSourceComments = globalOptions.groupSourceComments || command.groupSourceComments;
const groupSourceComments = globalOptions.groupSourceComments || options.groupSourceComments;

debug('Options:', { ...globalOptions, useMaintainers, groupSourceComments, output });

Expand Down

0 comments on commit 1909a63

Please sign in to comment.