Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
errors: Show available versions as lists instead of JSON
Browse files Browse the repository at this point in the history
PR-URL: #9927
  • Loading branch information
iarna committed Oct 15, 2015
1 parent 4f50366 commit a332f61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cache/add-named.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function installTargetsError (requested, data) {
requested = data.name + (requested ? "@'" + requested + "'" : '')

targets = targets.length
? 'Valid install targets:\n' + JSON.stringify(targets) + '\n'
? 'Valid install targets:\n' + targets.join(', ') + '\n'
: 'No valid targets found.\n' +
'Perhaps not compatible with your version of node?'

Expand Down
2 changes: 1 addition & 1 deletion lib/fetch-package-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function fetchNamedPackageData (dep, next) {

// And failing that, we error out
var targets = versions.length
? 'Valid install targets:\n' + JSON.stringify(versions) + '\n'
? 'Valid install targets:\n' + versions.join(', ') + '\n'
: 'No valid targets found.'
var er = new Error('No compatible version found: ' +
dep.raw + '\n' + targets)
Expand Down

0 comments on commit a332f61

Please sign in to comment.