New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lerna run --no-bail
throws error
#149
Comments
The code is the same as the original Lerna except that I rewrote it in TypeScript and I never used that flag, so I can't provide much help on this,. I would suggest to look at Lerna's issues to see if you can find anything that might help there. Or troubleshoot and create a Pull Request if you ever come up with a fix. The option seems to be used at this line in the run command the lerna debug log file that you provided might be helpful though, it says that it can't read |
looking at the shipped code on unpkg, the line number don't match totally but it seems to say that the the only way to troubleshoot this would be for you to edit that JS file and add a console log of the |
I tried checking modified code: if (!this.bail) {
results.forEach((result) => {
console.log(result)
if (result === null || result === void 0 ? void 0 : result.failed) {
this.logger.error('', `- ${result.pkg.name}`);
}
else {
this.logger.success('', ` - ${result.pkg.name}`);
}
});
} result from the log: {
command: 'npm run lint',
escapedCommand: 'npm run lint',
exitCode: 0,
stdout: '\n' +
'> @hephaestus/utils@0.0.0 lint\n' +
'> eslint src\n' +
'\n' +
'\n' +
'/Users/alex/Source/eris-boiler/packages/utils/src/type.ts\n' +
' 1:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any\n' +
' 16:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any\n' +
'\n' +
'✖ 2 problems (0 errors, 2 warnings)\n',
stderr: '',
all: undefined,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
} |
Actually it's probably because I replicated this open PR from a Lerna contribution and that PR was probably not tested properly (it has no unit test for it). That is probably the cause. I still need to see the content of
|
@alex-taxiera - if (!this.bail) {
+ if (!this.bail && !this.options.stream) {
results.forEach((result) => {
if (result?.failed) {
this.logger.error('', `- ${result.pkg.name}`);
} else {
this.logger.success('', ` - ${result.pkg.name}`);
}
});
} else {
this.logger.success('', this.packagesWithScript.map((pkg) => `- ${pkg.name}`).join('\n'));
} It would be nice if you can confirm that it fixes the issue. From my end it seems to be all good. |
fix(run): display pkg name only when not streaming, fixes #149
should be fixed in latest release 1.2.0 |
Describe the bug
Migrating to npm workspaces + lerna-lite from lerna and was trying to run my same
lint
command with--no-bail
flag.The command seems to work completely but throws an error after the success report. Tried the same command without the
--no-bail
flag and it passed just fine.Reproduction
run any command with
--no-bail
Lerna config and logs
lerna.json
lerna-debug.log
Environment Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: