sindresorhus / execa

Process execution for humans
MIT License
6.77k stars 214 forks source link

Bug with yarn install #473

Closed youngjuning closed 3 years ago

youngjuning commented 3 years ago

execa

const execa = require("execa");

execa.commandSync('yarn install',{
  stdout: "inherit",
  shell: true,
})

image

exec-sh、child-process

const execSh = require('exec-sh').promise;

execSh('yarn install',{
  shell: true
})
const { spawnSync } = require('child_process');

spawnSync("yarn install",{
  shell: true,
  stdio: 'inherit'
})

image

shelljs

const shell = require("shelljs");
shell.exec("yarn install");

image

ehmicky commented 3 years ago

Hi @youngjuning,

Thanks for reaching out.

Is the only difference the absence of the warning lines? Would the following work?

execa.commandSync('yarn install', {
  stdout: "inherit",
  stderr: "inherit",
  shell: true,
})
youngjuning commented 3 years ago

Hi @youngjuning,

Thanks for reaching out.

Is the only difference the absence of the warning lines? Would the following work?

execa.commandSync('yarn install', {
  stdout: "inherit",
  stderr: "inherit",
  shell: true,
})

Thanks, just work fine