Skip to content

Commit

Permalink
fail fast on checking tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchurch committed Apr 22, 2024
1 parent f5cd325 commit fab7a3a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/ado-npm-auth/src/npmrc/check-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ export const checkTokens = async function ({ feeds }: { feeds: NpmrcOrg[] }) {
}

try {
// check each feed for validity
for (const feed of feedsWithPat) {
await makeADORequest({
password: feed.pat || "",
await Promise.all(feedsWithPat.map(feed =>
makeADORequest({
password: feed.pat ?? "",
organization: feed.organization,
});
}

})
))
return true;
} catch (e) {
return false;
}

return true;
};

0 comments on commit fab7a3a

Please sign in to comment.