Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module.exports = function (packages, _options, cb) {
}, _options)

async.eachLimit(packages, 1, function (arg, next) {
var pkg = arg.substr(0, arg.indexOf('@')) || arg
var pkg = arg.split('@')[0]
try {
// TODO: Either skip this part if a version has been provided or check the package json version
require(pkg)
require.resolve(pkg)
return next()
} catch (err) {
var child = spawn('npm', ['install', arg], {stdio: options.stdio})
Expand Down