pkg-install
pkg-install copied to clipboard
Verbose flag is not working.
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?
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],
});