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.

dynamic terminal output of `exec` process not showing up

See original GitHub issue

If I do something like exec('npm install'), I don’t see the spinner thing that npm shows in the console normally. Or for instance download progress meters that some commands print to the console. Is there a way to get them to show up with shelljs?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:7
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
ariporadcommented, Jan 8, 2016

This is a duplicate of #251.

0reactions
chrisdugnecommented, Jan 5, 2022

as a workaround, I managed to have my dynamic terminal using spawn with stdio

  const {spawn} = require('child_process');

  spawn(
    'my-command',
    ['any', 'options'],
    {stdio: [process.stdin, process.stdout, process.stderr]}
  );
Read more comments on GitHub >

github_iconTop Results From Across the Web

Exec : display stdout "live" - node.js - Stack Overflow
I found that when the subprocess uses formatted output like colored text, stdio: "inherit" preserves that formatting while child.stdout.pipe(process.stdout) ...
Read more >
How to trick a command into thinking its output is going to a ...
It takes a command to run (which has to be a proper external command, of course) and runs it in such a way...
Read more >
Python's exec(): Execute Dynamically Generated Code
In this tutorial, you'll learn how to use Python's built-in exec() function to execute code that comes as either a string or a...
Read more >
How to manipulate files with shell redirection and pipelines in ...
The stdout is usually the terminal displayed by the monitor. There are other channels and streams (3 and up) that any process can...
Read more >
Node.js Child Processes: Everything you need to know
If you need to execute a file without using a shell, the execFile function is what you need. It behaves exactly like the...
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