Skip to content

Commit

Permalink
Fixing the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
k-bx committed Dec 7, 2019
1 parent 73203d6 commit 72a3bd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions installers/npm/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ module.exports = function(callback)
var version = package.version.replace(/^(\d+\.\d+\.\d+).*$/, '$1'); // turn '1.2.3-alpha' into '1.2.3'
var os = { 'darwin': 'mac', 'win32': 'windows', 'linux': 'linux' }[process.platform];
var arch = { 'x64': '64-bit', 'ia32': '32-bit' }[process.arch];
var url = 'https://github.com/elm/compiler/releases/download/' + version + '/binary-for-' + os + '-' + arch + '.gz';
var url = 'https://github.com/k-bx/github-agent/releases/download/' + version + '/binary-for-' + os + '-' + arch + '.gz';

reportDownload(version, url);

// figure out where to put the binary (calls path.resolve() to get path separators right on Windows)
var binaryPath = path.resolve(__dirname, package.bin.elm) + (process.platform === 'win32' ? '.exe' : '');
var binaryPath = path.resolve(__dirname, package.bin["github-agent"]) + (process.platform === 'win32' ? '.exe' : '');

// set up handler for request failure
function reportDownloadFailure(error)
Expand Down Expand Up @@ -74,7 +74,7 @@ function reportDownload(version, url)
{
console.log(
'--------------------------------------------------------------------------------\n\n'
+ 'Downloading Elm ' + version + ' from GitHub.'
+ 'Downloading Github Agent ' + version + ' from GitHub.'
+ '\n\nNOTE: You can avoid npm entirely by downloading directly from:\n'
+ url + '\nAll this package does is download that file and put it somewhere.\n\n'
+ '--------------------------------------------------------------------------------\n'
Expand Down
2 changes: 1 addition & 1 deletion installers/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"install",
"installer"
],
"bin": { "elm": "bin/github-agent" },
"bin": { "github-agent": "bin/github-agent" },
"dependencies": {
"request": "^2.88.0"
}
Expand Down

0 comments on commit 72a3bd3

Please sign in to comment.