about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2024-05-01 00:02:45 +0200
committerJan Tojnar <jtojnar@gmail.com>2024-05-02 23:19:08 +0200
commit96e6f1a418702870bfeb3e80ce62b9158fce0084 (patch)
tree38ee7d9367a5d4f27c89820c55ece043a9dc5581
parent5b2b3b8558e55d618a80526fdfe9af1952321cf1 (diff)
lib/gvariant: Fix error message for unsupported primitives
Without this, passing an integer to a setting will fail with a confusing error:

    error: cannot coerce an integer to a string
-rw-r--r--lib/gvariant.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gvariant.nix b/lib/gvariant.nix
index 708213224d3e..222267f60d8e 100644
--- a/lib/gvariant.nix
+++ b/lib/gvariant.nix
@@ -71,7 +71,7 @@ rec {
     else if isGVariant v then
       v
     else
-      throw "The GVariant type of ${v} can't be inferred.";
+      throw "The GVariant type of “${builtins.typeOf v}” can't be inferred.";
 
   /* Returns the GVariant array from the given type of the elements and a Nix list.