Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin committed Jan 11, 2017
1 parent dcf8afb commit e450635
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"chakracore": "https://github.com/nodejs/node-chakracore/releases/",
"chakracore-nightly": "https://nodejs.org/download/chakracore-nightly/"
},
"bootstrap": "node/6.9.3"
"bootstrap": "node/6.9.4"
}
14 changes: 7 additions & 7 deletions lib/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let nvsWindowsEnv = null; // Lazy load
* automatically in any new shell environment.
*
* @param version A node version to link, or null to use the
* current version from the PATH.
* current version from the PATH.
*/
function link(version) {
if (!version) {
Expand Down Expand Up @@ -208,11 +208,11 @@ function linkToProgramFiles(linkTarget) {
* directory.
*/
function linkToUsrLocal(linkTarget) {
// A normal system Node.js installation uses the following paths:
// /usr/local/bin/node
// /usr/local/lib/node_modules/
// /usr/local/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js
// /usr/local/bin/<exe> -> ../lib/node_modules/<mod>/bin/<exe>
// A normal system Node.js installation uses the following paths:
// /usr/local/bin/node
// /usr/local/lib/node_modules/
// /usr/local/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js
// /usr/local/bin/<exe> -> ../lib/node_modules/<mod>/bin/<exe>

let result = [];

Expand Down Expand Up @@ -353,7 +353,7 @@ function readLinks(dir, linkTargetFilter) {
* @param link True to add the link, false to remove it
* @param linkPath The link path to be added or removed
* @param isSystem True to modify the system profile,
* false to modify the user profile.
* false to modify the user profile.
*/
function linkToWindowsProfilePath(link, linkPath, isSystem) {
let result = [];
Expand Down
1 change: 1 addition & 0 deletions lib/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function find(filter, versions) {
resolvedVersion.semanticVersion,
resolvedVersion.arch || filter.arch || NodeVersion.defaultArch);
foundVersion.label = resolvedVersion.label;
foundVersion.path = resolvedVersion.path;
foundVersion.os = NodeVersion.defaultOs;

if (resolvedVersion.packages) {
Expand Down
2 changes: 1 addition & 1 deletion lib/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const path = require('path');

const versionRegex =
/^(([\w\-]+)[\/\-])?((v?(\d+(\.\d+(\.\d+)?)?(-[0-9A-Za-z.]+)?))|([a-z][a-z_\-][0-9a-z_\-]*))(\/((x86)|(32)|((x)?64)|(arm\w*)|(ppc\w*)))?$/i;
/^(([\w\-]+)\/)?((v?(\d+(\.\d+(\.\d+)?)?(-[0-9A-Za-z.]+)?))|([a-z][a-z_\-][0-9a-z_\-]*))(\/((x86)|(32)|((x)?64)|(arm\w*)|(ppc\w*)))?$/i;

class NodeVersion {
constructor(remoteName, semanticVersion, arch) {
Expand Down
10 changes: 4 additions & 6 deletions nvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
# arguments to the main nvs.js script.

# Try to locate the NVS_ROOT path, where the nvs scripts are installed.
if [ -z ${NVS_ROOT} ]; then
if [ -n "${BASH_SOURCE}" ]; then
export NVS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && \pwd)"
elif [ -n "${NVS_HOME}" ]; then
export NVS_ROOT="${NVS_HOME}"
fi
if [ -n "${BASH_SOURCE}" ]; then
export NVS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && \pwd)"
elif [ -n "${NVS_HOME}" -a -z ${NVS_ROOT} ]; then
export NVS_ROOT="${NVS_HOME}"
fi

nvs() {
Expand Down

0 comments on commit e450635

Please sign in to comment.