mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
nixos/lib: use removePrefix in escapeSystemdPath
This commit is contained in:
parent
1b575dbd79
commit
8b07500163
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user