on master help sign in
Improve two of the npm installer error messages a little bit
fdf16a5Evan Czaplicki
installers/npm/download.js+5−3
@@ -34,13 +34,15 @@ function download(destinationPath, url, callback)
34{
34{
35 requestWithRedirects(url, 10,
35 requestWithRedirects(url, 10,
36 function(error) {
36 function(error) {
37− var url = host + '/' + path;
38− exitFailure(url, 'Error fetching binary from ' + url + ': ' + error);
37+ exitFailure(url, 'I ran into trouble while fetching ' + url + '\n\n' + error);
39 },
38 },
40 function(response) {
39 function(response) {
41 if (response.statusCode == 404)
40 if (response.statusCode == 404)
42 {
41 {
43− exitFailure(url, 'I got a "404 Not Found" trying to download from the following URL:\n' + url);
42+ exitFailure(url, 'I got a "404 Not Found" trying to download from the following URL:\n'
43+ + url
44+ + '\n\nThis may mean you are trying to install on an unsupported platform. (e.g. some 32-bit systems?)'
45+ );
44 }
46 }
45
47
46 response.on('error', function() {
48 response.on('error', function() {