pkg-install icon indicating copy to clipboard operation
pkg-install copied to clipboard

Verbose flag is not working.

Open sprakash57 opened this issue 4 years ago • 1 comments

What is happening?

Setting the verbose flag true for one of my tasks does not print installation logs in the terminal.

Description

I am using pkg-install with listr. One of the tasks is to install all the dependencies as well as print installation logs (like what usually prints when you do npm install). It is installing the dependencies completely fine, but doing it silently without printing anything in the terminal.

import { projectInstall } from 'pkg-install';
....
....
 const tasks = new list([
. . . .  . .
. . . . . .  .

{
      title: 'Installing dependencies. It will take few minutes. Please do not cancel the installation.',
      task: () => projectInstall({ cwd: newOptions.target, verbose: true })
}

... . . . . .
])

Am I missing something?

sprakash57 avatar Apr 04 '21 05:04 sprakash57

In another issue: https://github.com/dkundel/pkg-install/issues/2#issuecomment-523300474 someone was suggesting to use the stdio option, which seems to work:

await projectInstall({
    cwd: newOptions.target,
    stdio: ["pipe", process.stdout, process.stderr],
  });

mbehzad avatar May 13 '24 09:05 mbehzad