镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

execSync no output #40360

Closed
Closed

Description

@steven94kr

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

Activity

  1. mscdex commented on Oct 7, 2021

    @mscdex
    Contributor

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

  2. steven94kr commented on Oct 7, 2021

    @steven94kr
    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

  3. steven94kr commented on Oct 7, 2021

    @steven94kr
    Author

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

  4. steven94kr commented on Oct 13, 2021

    @steven94kr
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions