diff --git a/bin/index.js b/bin/index.js index 1cb4aa9..1e6be44 100644 --- a/bin/index.js +++ b/bin/index.js @@ -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]); diff --git a/package.json b/package.json index 5c27496..6f22b43 100644 --- a/package.json +++ b/package.json @@ -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",