Skip to content

Commit 9d4d820

Browse files
committed
lib
1 parent 33e5efd commit 9d4d820

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10376,7 +10376,7 @@ const replace_formula_fields_1 = __nccwpck_require__(6734);
1037610376
const calculate_download_checksum_1 = __importDefault(__nccwpck_require__(6755));
1037710377
const github_1 = __nccwpck_require__(5438);
1037810378
function tarballForRelease(owner, repo, tagName) {
10379-
return `https://github.com/${owner}/${repo}/archive/${tagName}.tar.gz`;
10379+
return `https://github.com/${owner}/${repo}/archive/refs/tags/${tagName}.tar.gz`;
1038010380
}
1038110381
function formulaPath(owner, repo, formulaName) {
1038210382
if (owner.toLowerCase() == 'homebrew' &&
@@ -10590,12 +10590,11 @@ function compare(v1, v2) {
1059010590
return 0;
1059110591
}
1059210592
exports.compare = compare;
10593-
const ghDownloadRE = /^https:\/\/github.com\/[^/]+\/[^/]+\/releases\/download\/([^/]+)/;
10594-
// TODO: https://github.com/Homebrew/brew/blob/675e38b5e4fe0290fa05f65af23c9a82d3e7cc76/Library/Homebrew/version.rb#L225-L363
10593+
const ghDownloadRE = /^https:\/\/github.com\/[^/]+\/[^/]+\/releases\/download\/(.+)\/[^/]+$/;
1059510594
function fromUrl(url) {
1059610595
const downloadMatch = url.match(ghDownloadRE);
1059710596
if (downloadMatch) {
10598-
return downloadMatch[1];
10597+
return decodeURIComponent(downloadMatch[1]);
1059910598
}
1060010599
return (0, path_1.basename)(url).replace(/\.(tar\.gz|tgz|zip)$/, '');
1060110600
}

lib/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)