Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Normalize runtime name for binary installation
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Feb 12, 2015
1 parent d7c189b commit c365f8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ var semver = require('semver'),
*/

function getRuntimeName() {
return process.execPath
var runtime = process.execPath
.split(/[\\/]+/).pop()
.split('.').shift();

return runtime === 'node' || runtime === 'nodejs' ? 'node' : runtime;

This comment has been minimized.

Copy link
@am11

am11 Feb 12, 2015

Contributor

This can be shrunk to return runtime === 'nodejs' ? 'node' : runtime;.

This comment has been minimized.

Copy link
@xzyfer

xzyfer Feb 12, 2015

Author Contributor

You're right. It was a panic commit ;) things were on fire

}

/**
Expand Down

0 comments on commit c365f8c

Please # to comment.