mirror of
https://github.com/TheWhiteDog9487/lag2cn.git
synced 2026-08-11 23:01:29 +08:00
WSL的支持范围锁定到Ubuntu
Debian我这测试没反应,不清楚啥原因
This commit is contained in:
@@ -159,6 +159,12 @@ int main() {
|
|||||||
auto OS = GetCurrentSystem();
|
auto OS = GetCurrentSystem();
|
||||||
cout << "检测到您使用的系统为:" << OS << endl;
|
cout << "检测到您使用的系统为:" << OS << endl;
|
||||||
cout << "并且该系统工作于WSL环境" << endl;
|
cout << "并且该系统工作于WSL环境" << endl;
|
||||||
|
if (OS.find("Ubuntu") == string::npos){
|
||||||
|
cout << endl
|
||||||
|
<< "警告:当前仅适配了Ubuntu" << endl
|
||||||
|
<< "强行使用可能会造成不可预知的问题" << endl
|
||||||
|
<< "为避免出现故障,程序会强制退出" << endl;
|
||||||
|
throw runtime_error("不支持的发行版"); }
|
||||||
auto CurrentUser = GetCurrentUser();
|
auto CurrentUser = GetCurrentUser();
|
||||||
if (CurrentUser == User::Root){
|
if (CurrentUser == User::Root){
|
||||||
WSL(); }
|
WSL(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user