1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 07:52:43 +01:00
nix/tests
Linus Heckemann 9fed865d1d libutil: handle json builder log messages with unexpected format
Before this change, expressions like:

with import <nixpkgs> {};
runCommand "foo" {} ''
  echo '@nix {}' >&$NIX_LOG_FD
''

would result in Lix crashing, because accessing nonexistent fields of
a JSON object throws an exception.

Rather than handling each field individually, we just catch JSON
exceptions wholesale. Since these log messages are an unusual
circumstance, log a warning when this happens.

Fixes #544.

Change-Id: Idc2d8acf6e37046b3ec212f42e29269163dca893
(cherry picked from commit e55cd3beea710db727fd966f265a1b715b7285f3)
(cherry picked from commit ee03fd478e)
2024-12-09 21:39:58 +00:00
..
functional libutil: handle json builder log messages with unexpected format 2024-12-09 21:39:58 +00:00
installer tests: test with conflicting profile links 2023-12-30 06:24:06 +00:00
nixos builtins.fetchurl: Fix segfault on s3:// URLs 2024-10-14 14:44:28 +02:00
unit Ensure error messages don't leak private key 2024-09-24 06:39:03 +02:00
repl-completion.nix Add repl completion test 2024-05-27 09:58:49 +02:00