diff --git a/language.cpp b/language.cpp index 69c17d7..1f4a7d7 100644 --- a/language.cpp +++ b/language.cpp @@ -27,7 +27,6 @@ LC_ALL="zh_CN.UTF-8" enum class System{ WSL, - Windows, Linux, Unsupported }; enum class User{ @@ -58,9 +57,6 @@ auto GetCurrentSystemType(){ if (getenv("WSL_INTEROP") != nullptr){ return System::WSL; } #pragma warning(suppress : 4996) - if (getenv("OS") != nullptr){ - return System::Windows;} - #pragma warning(suppress : 4996) else if (getenv("HOME") != nullptr){ return System::Linux;} else{ @@ -158,10 +154,7 @@ auto Debian(){ int main() { auto OSType = GetCurrentSystemType(); - if (OSType == System::Windows){ - cout << "Windows请在“设置”应用中调整语言(❁´◡`❁)。" << endl; - throw runtime_error("不支持的操作系统"); } - else if (OSType == System::WSL) { + if (OSType == System::WSL) { auto OS = GetCurrentSystem(); cout << "检测到您使用的系统为:" << OS << endl; cout << "并且该系统工作于WSL环境" << endl;