1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00
nix/tests
Linus Heckemann ee03fd478e 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)
2024-12-09 15:59:59 +01:00
..
functional libutil: handle json builder log messages with unexpected format 2024-12-09 15:59:59 +01:00
installer Revert "tests.installer: Load profile with -o unset" 2024-09-18 23:06:01 +02:00
nixos tests/nixos: add more thorough nix-docker tests 2024-11-11 22:56:46 +00:00
repl-completion.nix Add repl completion test 2024-05-27 09:58:49 +02:00