From 8b07500163819bcad8bedc37af52e700bf835405 Mon Sep 17 00:00:00 2001 From: florianjacob Date: Sat, 14 Mar 2020 04:13:04 +0100 Subject: [PATCH] nixos/lib: use removePrefix in escapeSystemdPath --- nixos/lib/utils.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index a522834e4294..21f4c7c6988f 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -14,7 +14,7 @@ rec { # becomes dev-xyzzy. FIXME: slow. escapeSystemdPath = s: replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"] - (if hasPrefix "/" s then substring 1 (stringLength s) s else s); + (removePrefix "/" s); # Returns a system path for a given shell package toShellPath = shell: