From c752724c25552ee1d1d5f78a5aa8336b4486c818 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 28 Dec 2020 11:57:57 -0800 Subject: [PATCH] fix: allow skip to be defined as an array (#222) --- src/cli.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 669848b2..a842c776 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -128,7 +128,11 @@ async function main() { serverRoot: flags.serverRoot, }; if (flags.skip) { - opts.linksToSkip = flags.skip.split(' ').filter(x => !!x); + if (typeof flags.skip === 'string') { + opts.linksToSkip = flags.skip.split(' ').filter(x => !!x); + } else if (Array.isArray(flags.skip)) { + opts.linksToSkip = flags.skip; + } } const result = await checker.check(opts); const filteredResults = result.links.filter(link => {