mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: bsd status (#284)
This commit is contained in:
@@ -9,16 +9,14 @@ enum SystemType {
|
||||
|
||||
const SystemType._(this.value);
|
||||
|
||||
static const linuxSign = '__linux';
|
||||
static const bsdSign = '__bsd';
|
||||
|
||||
static SystemType parse(String value) {
|
||||
switch (value.trim()) {
|
||||
case linuxSign:
|
||||
return SystemType.linux;
|
||||
case bsdSign:
|
||||
return SystemType.bsd;
|
||||
default:
|
||||
// Fallback to linux
|
||||
return SystemType.linux;
|
||||
if (value.contains(bsdSign)) {
|
||||
return SystemType.bsd;
|
||||
}
|
||||
return SystemType.linux;
|
||||
}
|
||||
|
||||
bool isSegmentsLenMatch(int len) => len == segmentsLen;
|
||||
@@ -32,6 +30,3 @@ enum SystemType {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const linuxSign = 'linux';
|
||||
const bsdSign = 'bsd';
|
||||
|
||||
Reference in New Issue
Block a user