From 0f90b6eaf2ca757834eacdaa2ed90addecebddc4 Mon Sep 17 00:00:00 2001 From: James Kyle Date: Sun, 8 Nov 2015 15:35:14 -0800 Subject: [PATCH 1/2] Add link to npm upgrade guide on windows. Re: https://github.com/babel/babel/commit/1c3b4aa41088a9167646143f5116a02af0b8d409#commitcomment-14211658 --- packages/babel-cli/src/babel-doctor/rules/npm-3.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/babel-cli/src/babel-doctor/rules/npm-3.js b/packages/babel-cli/src/babel-doctor/rules/npm-3.js index 938b23d20d..ba2c4c44c0 100644 --- a/packages/babel-cli/src/babel-doctor/rules/npm-3.js +++ b/packages/babel-cli/src/babel-doctor/rules/npm-3.js @@ -5,7 +5,11 @@ export default function () { return new Promise(function (resolve) { binVersionCheck("npm", ">=3.3.0", function (err) { if (err) { - resolve([false, `Your npm version is outdated. Upgrade to the latest version by running:\n$ ${chalk.magenta("npm install -g npm")}`]); + let message = `Your npm version is outdated. Upgrade to the latest version by running:\n$ ${chalk.magenta("npm install -g npm")}.`; + if (process.platform === 'win32') { + message += ` See this guide if you are having trouble upgrading: ${chalk.underline.blue("https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows")}`; + } + resolve([false, message]); } else { resolve([true, "You're on npm >=3.3.0"]); } From cd11f1e4f57e194f4fc2bb850020783a833cbcbc Mon Sep 17 00:00:00 2001 From: James Kyle Date: Mon, 9 Nov 2015 15:59:43 -0800 Subject: [PATCH 2/2] double quotes --- packages/babel-cli/src/babel-doctor/rules/npm-3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-cli/src/babel-doctor/rules/npm-3.js b/packages/babel-cli/src/babel-doctor/rules/npm-3.js index ba2c4c44c0..e159816f39 100644 --- a/packages/babel-cli/src/babel-doctor/rules/npm-3.js +++ b/packages/babel-cli/src/babel-doctor/rules/npm-3.js @@ -6,7 +6,7 @@ export default function () { binVersionCheck("npm", ">=3.3.0", function (err) { if (err) { let message = `Your npm version is outdated. Upgrade to the latest version by running:\n$ ${chalk.magenta("npm install -g npm")}.`; - if (process.platform === 'win32') { + if (process.platform === "win32") { message += ` See this guide if you are having trouble upgrading: ${chalk.underline.blue("https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows")}`; } resolve([false, message]);