Skip to content

open Cargo.toml | to-json | jq . hangs forever #928

Closed

Description

@Byron

Describe the bug
When using jq as external program, it fails to read the provided json from stdin and thus waits forever. CTRL+C has to be used to abort it.
When looking into the open files of the running jq process I noticed that its standard input was connected to the TTY, not the nu process producing the data.

To Reproduce
(within nushell)

  1. cd nushell
    (the nushell repository)
  2. open Cargo.toml | to-json | jq .

When executing open Cargo.toml | to-json it shows a JSON string as expected and awaits further user input.

Expected behavior
jq reads the JSON encoded string produced by to-json and outputs it with white space and colors. When done, the whole pipeline finishes and nu awaits further input.

Configuration:

  • OS: MacOS 10.15
  • Version 0.5.0 (compiled from source with default features)

Activity

  1. changed the title [-]`open Cargo.toml | to-json | jq .` hangs forver[/-] [+]`open Cargo.toml | to-json | jq .` hangs forever[/+] on Nov 6, 2019
  2. added a commit that references this issue on Feb 7, 2022
  3. added a commit that references this issue on Feb 7, 2022
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions