chore: change warning message

This commit is contained in:
Dmitriy Pleshevskiy 2024-02-28 15:04:43 +03:00
parent e980b4d450
commit a45e0eee22
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -18,8 +18,9 @@ let
inherit (builtins) isString isFloat isInt isBool isList isAttrs isNull isPath;
inherit (builtins) concatStringsSep filter mapAttrs attrValues;
# Source: https://github.com/NixOS/nixpkgs/blob/12f0044f83517e653d0b4fe12a99d162d9407437/lib/trivial.nix#L357
warn = msg: builtins.trace "[1;31mwarning: ${msg}[0m";
error = message: throw "[nix2lua] ${message}";
warn = msg: builtins.trace "[nix2lua] warning: ${msg}";
mkLuaRaw = raw: { _type = "raw"; inherit raw; };
isLuaRaw = expr: getType expr == "raw";
@ -75,8 +76,6 @@ let
validString = expr:
if isString expr || isPath expr then toString expr
else error "Value '${toString expr}' is not a valid string";
error = message: throw "[nix2lua] ${message}";
in
{
inherit toLua;