question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lint-stage doesn't print any task internal console outputs.

See original GitHub issue

Description

I would like to see the full output generated by the npm scripts I have configured in the “lint-staged” section. At the moment, I can only see the output generated by lint-stage itself but nothing from the subtasks.

Steps to reproduce

package.json

  "lint-staged": {
    "package-lock.json": [
      "node scripts/myCustomScript.js"
    ],
  },

myCustomScript.js console.log('This never gets printed');

Debug Logs

expand to view
COPY THE DEBUG LOGS HERE

Environment

  • OS: Windows 10
  • Node.js: 11.4.0
  • lint-staged: 8.1.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:14
  • Comments:7

github_iconTop GitHub Comments

3reactions
rrecaredocommented, Feb 15, 2019

Piping exaca > process.stdout in execLinter function from resolveTasksFn solves the issue for me but not sure about the side effects it could generate. return execa(bin, binArgs, { ...execaOptions })**.stdout.pipe(process.stdout);**

1reaction
yufengwangcommented, Jul 8, 2020

It’s my fault, I just called process.exit() in my internal scripts, change to process.exitCode do help,after that all my console output displayed completely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using lint-staged, husky, and pre-commit hooks to fail fast and ...
This pipeline is triggered on every push and pull request, ... and printing the linter's output to the console to allow manual fixes...
Read more >
No multiprocessing print outputs (Spyder) - Stack Overflow
Now it is clear that the console only seems to print the info function, but not any output of the f function (which...
Read more >
Release and Version History — pipenv 2022.12.20.dev0 ...
virtualenv creation no longer uses --creator=venv by default; introduced two environment ... Fix regression: pipenv does not sync indexes to lockfile.
Read more >
Bitcoin Core 0.17.0
Bitcoin Core should also work on most other Unix-like systems but is not ... He constructs a PSBT that contains certain inputs and...
Read more >
failed to load parser '@angular-eslint/template-parser' - You.com
Here is my issue: When I run "ng test" with ChromeHeadless on my local machine, all the test are triggered correctly and I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found