Skip to content

Commit

Permalink
destucuring of record entries
Browse files Browse the repository at this point in the history
Signed-off-by: Jonah Iden <[email protected]>
  • Loading branch information
jonah-iden committed Apr 13, 2023
1 parent 97bb005 commit 795613c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev-packages/cli/src/download-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ const placeholders: Record<string, string> = {
targetPlatform: `${process.platform}-${process.arch}`
};
function resolveDownloadUrlPlaceholders(url: string): string {
for (const placeholder of Object.entries(placeholders)) {
url = url.replace(new RegExp(escapeStringRegexp(`\${${placeholder[0]}}`), 'g'), placeholder[1]);
for (const [name, value] of Object.entries(placeholders)) {
url = url.replace(new RegExp(escapeStringRegexp(`\${${name}}`), 'g'), value);
}
return url;
}
Expand Down

0 comments on commit 795613c

Please sign in to comment.