ADD win_ext to URL template variables

This commit is contained in:
David Recuenco
2019-03-25 15:17:11 +01:00
parent 9071f9b229
commit 6eaf5fc9af
2 changed files with 13 additions and 8 deletions

View File

@@ -129,7 +129,11 @@ function parsePackageJson() {
// Binary name on Windows has .exe suffix
if (process.platform === "win32") {
binName += ".exe"
binName += ".exe";
url = url.replace(/{{win_ext}}/g, '.exe');
} else {
url = url.replace(/{{win_ext}}/g, '');
}
// Interpolate variables in URL, if necessary
@@ -143,7 +147,7 @@ function parsePackageJson() {
binPath: binPath,
url: url,
version: version
}
};
}
/**