summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-02-01 11:32:34 +0300
committerK900 <me@0upti.me>2023-02-01 11:32:34 +0300
commit5ff480e3bd98b83a804ddebde1efacef7a4a2f8d (patch)
tree91d0868e861657ea4456175613ff4ea2c86f115f /modules
parentfa07181d211cd6220c687ecc8ef542df5ba4918d (diff)
fix: actually fix PATH filtering
Diffstat (limited to 'modules')
-rw-r--r--modules/wsl-distro.nix4
1 files changed, 2 insertions, 2 deletions
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' ':')
''}
'';
};