nix-output-monitor icon indicating copy to clipboard operation
nix-output-monitor copied to clipboard

Paths from --print-out-paths are swallowed into stderr, unless wrapper is used

Open cab404 opened this issue 4 months ago • 3 comments

(nushell is used cause output is nice)

(nix "build" "nixpkgs#hello" "--log-format" "internal-json" --print-out-paths o+e>| nom --json) | complete
╭───────────┬──────────────────────────────────────────────────────────╮
│ stdout    │                                                          │
│ stderr    │ /nix/store/kwmqk7ygvhypxadsdaai27gl6qfxv7za-hello-2.12.1 │
│           │ Finished at 23:57:05 after 0s                            │
│           │                                                          │
│ exit_code │ 0                                                        │
╰───────────┴──────────────────────────────────────────────────────────╯

(nom "build" "nixpkgs#hello" "--log-format" "internal-json" --print-out-paths) | complete
╭───────────┬──────────────────────────────────────────────────────────╮
│ stdout    │ /nix/store/kwmqk7ygvhypxadsdaai27gl6qfxv7za-hello-2.12.1 │
│           │                                                          │
│ stderr    │ Finished at 23:57:32 after 0s                            │
│           │                                                          │
│ exit_code │ 0                                                        │
╰───────────┴──────────────────────────────────────────────────────────╯

It should probably be possible to just print out non-json stuff from stdin to stdout instead of stderr? I am not sure if it will break anything.

cab404 avatar Sep 29 '24 20:09 cab404