diff --git a/src/Utils.ts b/src/Utils.ts index e50d326..d643d10 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -127,6 +127,7 @@ export async function parseInputFile(inputFile: string, defaultOutDir: string, if (foundUrl) { outDirList.push(...Array(guidList.length - outDirList.length) .fill(defaultOutDir)); + foundUrl = false; } const guids: Array | null = await extractGuids(line, apiClient); @@ -140,6 +141,12 @@ export async function parseInputFile(inputFile: string, defaultOutDir: string, } } + // if foundUrl is still true after the loop we have some url without an outDir + if (foundUrl) { + outDirList.push(...Array(guidList.length - outDirList.length) + .fill(defaultOutDir)); + } + return [guidList, outDirList]; }