Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execSync no output #40360

Closed
steven94kr opened this issue Oct 7, 2021 · 4 comments
Closed

execSync no output #40360

steven94kr opened this issue Oct 7, 2021 · 4 comments
Labels
child_process Issues and PRs related to the child_process subsystem.

Comments

@steven94kr
Copy link

Version

v14.17.6

Platform

Linux steven-ubuntu 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

const root = require("child_process")
    .execSync("node -v")
    .toString();

console.log(root);

I expected the output is the v14.17.6, but I got nothing.

  const root = require("child_process")
    .execSync("node -v", {stdio:"inherit"})

In this case, I got the output in console.

It is so strange...
Can anyone help me?
I tried to search, about this case. But I can't get any helpful information.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@VoltrexKeyva VoltrexKeyva added the child_process Issues and PRs related to the child_process subsystem. label Oct 7, 2021
@mscdex
Copy link
Contributor

mscdex commented Oct 7, 2021

It works fine for me with node v14.18.0 on Linux.

@steven94kr
Copy link
Author

It works fine for me with node v14.18.0 on Linux.

Why didn't I think of that?
Thank you for your kindness.
I will reply after trying it again with node v14.18.0

@steven94kr
Copy link
Author

steven94kr commented Oct 7, 2021

It works fine for me with node v14.18.0 on Linux :)
sorry for wasting your time.

@mscdex mscdex closed this as completed Oct 7, 2021
@steven94kr
Copy link
Author

steven94kr commented Oct 13, 2021

I have confirmed that the issue only occurs on nodes installed from snap.
Thanks a lot. sorry again for wasting your time
nodejs/snap#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants