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

Nix CLI prints control chars into stderr which cause inconsistent result #11583

Open
luochen1990 opened this issue Sep 25, 2024 · 0 comments · May be fixed by #11994
Open

Nix CLI prints control chars into stderr which cause inconsistent result #11583

luochen1990 opened this issue Sep 25, 2024 · 0 comments · May be fixed by #11994
Labels

Comments

@luochen1990
Copy link

Describe the bug

Run nix command multiple times, and you can get different output, even for read-only commands.

See also: BurntSushi/ripgrep#2899

Steps To Reproduce

  1. Run nix registry list | rg nixpkgs multiple times (10 might be enough)
  2. See the Inconsistent output result
$ nix registry list | rg nixpkgs
system flake:nixpkgs path:/nix/store/asmpdfb2aixsjl95a557c269ybzybjm3-source
global flake:nixpkgs github:NixOS/nixpkgs/nixpkgs-unstable
$ nix registry list | rg nixpkgs


$ nix registry list | rg nixpkgs


$ nix registry list | rg nixpkgs


$ nix registry list | rg nixpkgs

global flake:nixpkgs github:NixOS/nixpkgs/nixpkgs-unstable

Expected behavior

The output shoud be the same with the same command

nix-env --version output

Additional context

Just use nix repl and without rg can still reproduce this issue (when something is slow to evaluate).

image

Priorities

Add 👍 to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant