Skip to content

Commit

Permalink
better getRepos() function, #364
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kauzmann <[email protected]>
  • Loading branch information
zepumph committed Oct 21, 2024
1 parent cf0f51e commit df46e7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/grunt/tasks/util/getRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ const getRepo = (): Repo => {
};

export const getRepos = (): Repo[] => {
return getOption( 'repos' ) ? getOption( 'repos' ).split( ',' ) : [];
const reposArg = getOption( 'repos' );
if ( reposArg ) {
assert( typeof reposArg === 'string', 'repos should be a comma separated list of values' );
return getOption( 'repos' ).split( ',' );
}

return [];
};

export default getRepo;

0 comments on commit df46e7b

Please sign in to comment.