fix(recursive): report prefix when one of the installs fail

This commit is contained in:
Zoltan Kochan
2018-01-26 23:12:06 +02:00
parent 8c6a700431
commit 6bd11b1f41

View File

@@ -71,9 +71,14 @@ export default async (
for (const chunk of chunks) {
await Promise.all(chunk.map((prefix: string) =>
limitInstallation(() => {
limitInstallation(async () => {
const hooks = opts.ignorePnpmfile ? {} : requireHooks(prefix)
return install({...installOpts, hooks, storeController, prefix})
try {
return await install({...installOpts, hooks, storeController, prefix})
} catch (err) {
err['prefix'] = prefix
return err
}
}),
))
}