Skip to content

Commit

Permalink
Remove unnecessary try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Mar 23, 2020
1 parent 0f623cd commit 4179376
Showing 1 changed file with 11 additions and 26 deletions.
37 changes: 11 additions & 26 deletions bin/api-docs/update-api-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,31 +203,16 @@ glob.stream( [
// so the tokens must be replaced in sequence to prevent the processes
// from overriding each other.
for ( const [ token, path ] of tokens ) {
try {
await execa(
join(
__dirname,
'..',
'..',
'node_modules',
'.bin',
'docgen'
),
[
relative( ROOT_DIR, resolve( dirname( file ), path ) ),
`--output ${ output }`,
'--to-token',
`--use-token "${ token }"`,
'--ignore "/unstable|experimental/i"',
],
{ shell: true }
);
} catch ( error ) {
// Disable reason: Errors should log to console.

// eslint-disable-next-line no-console
console.error( error );
process.exit( 1 );
}
await execa(
join( __dirname, '..', '..', 'node_modules', '.bin', 'docgen' ),
[
relative( ROOT_DIR, resolve( dirname( file ), path ) ),
`--output ${ output }`,
'--to-token',
`--use-token "${ token }"`,
'--ignore "/unstable|experimental/i"',
],
{ shell: true }
);
}
} );

0 comments on commit 4179376

Please sign in to comment.