From 5ff480e3bd98b83a804ddebde1efacef7a4a2f8d Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 1 Feb 2023 11:32:34 +0300 Subject: fix: actually fix PATH filtering --- modules/wsl-distro.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index 61de095..615da2f 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -179,9 +179,9 @@ with lib; { # preserve $PATH from parent variables.PATH = [ "$PATH" ]; extraInit = '' - export WSLPATH=$(echo "$PATH" | tr ':' '\0' | command grep -a "^${cfg.wslConf.automount.root}" | tr '\0' ':') + export WSLPATH=$(echo "$PATH" | tr ':' '\0' | command grep -az "^${cfg.wslConf.automount.root}" | tr '\0' ':') ${if cfg.interop.includePath then "" else '' - export PATH=$(echo "$PATH" | tr ':' '\0' | command grep -av "^${cfg.wslConf.automount.root}" | tr '\0' ':') + export PATH=$(echo "$PATH" | tr ':' '\0' | command grep -avz "^${cfg.wslConf.automount.root}" | tr '\0' ':') ''} ''; }; -- cgit v1.2.3