diff --git a/src/lib/packages.ts b/src/lib/packages.ts index 7f77323c..168ebea3 100644 --- a/src/lib/packages.ts +++ b/src/lib/packages.ts @@ -49,8 +49,8 @@ export async function apply( await fn(packageName); log(options, debug, afterEach(packageName)); } catch (err) { + errors.push(err); if (options.failFast) { - errors.push(err); log(options, debug, afterEach(packageName, err)); } } @@ -58,7 +58,7 @@ export async function apply( log(options, debug, after(packages, errors)); if (errors.length) { - console.error(errors); + errors.forEach((e) => console.error(e.toString())); process.exit(1); } }