summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Thwaites <danthwaites30@btinternet.com>2022-04-24 14:17:43 +0100
committerDaniel Thwaites <danthwaites30@btinternet.com>2022-05-01 17:39:42 +0100
commite888c2133fb703d0161a6d7fb45f899289cb9729 (patch)
tree228d68ddfdb75a901be6cca36f5ed5102ba05009 /lib
parentMerge pull request #171117 from erictapen/imagemagick (diff)
downloadnixpkgs-e888c2133fb703d0161a6d7fb45f899289cb9729.tar.gz
lib/strings: convert to string within hasInfix
This should fix the issue mentioned here: https://github.com/NixOS/nixpkgs/pull/168175#issuecomment-1107830574
Diffstat (limited to 'lib')
-rw-r--r--lib/strings.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index d3ef748fb71e..328f64cf1b61 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -254,7 +254,7 @@ rec {
=> false
*/
hasInfix = infix: content:
- builtins.match ".*${escapeRegex infix}.*" content != null;
+ builtins.match ".*${escapeRegex infix}.*" "${content}" != null;
/* Convert a string to a list of characters (i.e. singleton strings).
This allows you to, e.g., map a function over each character. However,