fix: bsd status (#284)

This commit is contained in:
lollipopkit
2024-03-12 20:47:18 -06:00
parent 0ad7b4f8b8
commit e361e509af
2 changed files with 8 additions and 13 deletions

View File

@@ -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';