Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit 1f01fc1

Browse files
committed
fix: [#319] check WSLInterop-late too
1 parent 5f8e8da commit 1f01fc1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/wslu-header

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,14 @@ if __wsl_conf_read interop enabled | grep false >/dev/null; then
7878
2. under [interop] section, set enabled to true;
7979
3. restart your distribution."
8080
exit 1
81-
elif grep ^disabled /proc/sys/fs/binfmt_misc/WSLInterop >/dev/null; then
82-
echo -e "WSL Interopability is temporarily disabled and WSL Utilities won't work. Please enable it by:
83-
# echo 1 > /proc/sys/fs/binfmt_misc/WSLInterop"
84-
exit 1
81+
elif [ -f /proc/sys/fs/binfmt_misc/WSLInterop ] && grep -q '^disabled' /proc/sys/fs/binfmt_misc/WSLInterop; then
82+
echo "WSL Interopability is temporarily disabled and WSL Utilities won't work. Please enable it by:
83+
# echo 1 > /proc/sys/fs/binfmt_misc/WSLInterop"
84+
exit 1
85+
elif [ -f /proc/sys/fs/binfmt_misc/WSLInterop-late ] && grep -q '^disabled' /proc/sys/fs/binfmt_misc/WSLInterop-late; then
86+
echo "WSL Interopability is temporarily disabled and WSL Utilities won't work. Please enable it by:
87+
# echo 1 > /proc/sys/fs/binfmt_misc/WSLInterop-late"
88+
exit 1
8589
fi
8690

8791
# when --verbose, verbose; when --debug, debug.

0 commit comments

Comments
 (0)