mirror of
https://github.com/ershisan99/go-npm.git
synced 2025-12-16 20:59:28 +00:00
Windows binaries get a .exe extension
This commit is contained in:
@@ -123,6 +123,11 @@ function parsePackageJson() {
|
||||
let version = packageJson.version;
|
||||
if (version[0] === 'v') version = version.substr(1); // strip the 'v' if necessary v0.0.1 => 0.0.1
|
||||
|
||||
// Binary name on Windows has .exe suffix
|
||||
if (process.platform === "win32") {
|
||||
binName += ".exe"
|
||||
}
|
||||
|
||||
// Interpolate variables in URL, if necessary
|
||||
url = url.replace(/{{arch}}/g, ARCH_MAPPING[process.arch]);
|
||||
url = url.replace(/{{platform}}/g, PLATFORM_MAPPING[process.platform]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "go-npm",
|
||||
"version": "0.1.5",
|
||||
"version": "0.1.6",
|
||||
"description": "Distribute and install Go binaries via NPM",
|
||||
"main": "index.js",
|
||||
"bin": "index.js",
|
||||
|
||||
Reference in New Issue
Block a user