From de25ae6077c278ec61704b5cef6c3fb6d77c601a Mon Sep 17 00:00:00 2001 From: MBCPApp Author Date: Fri, 2 May 2025 08:49:51 -0700 Subject: [PATCH] prevent user from running patch in WSL --- MBCPApp/patch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MBCPApp/patch.sh b/MBCPApp/patch.sh index 985160f..a4e3c5d 100755 --- a/MBCPApp/patch.sh +++ b/MBCPApp/patch.sh @@ -1,3 +1,14 @@ +#!/bin/bash + +# Check if user trying to run under HyperV (Windows Subsystem For Linux) +# Remove this detection part to bypass WSL detection might lead project development to be STOPPED, You've warned ! +if [ -f /proc/sys/fs/binfmt_misc/WSLInterop ]; then +echo "Detected WSL (Windows Subsystem for Linux) in current Linux environment !!" +echo "INFO : MBCPApp Patcher must be run on actual or virtualized (non-WSL) Linux environment instead !!!" +echo "INFO : Trying to remove WSL detection code might make script not works properly !" +exit +fi + echo --------------------------- echo Patch list for MBCPApp : PS3='Select patch options : '