mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
fix issues with legacy packages (#2841)
* fix issues with legacy packages * include non-prerelease versions within compat range * lock sdk to corresponding os prerelease * bump sdk version * fixes from PR review
This commit is contained in:
@@ -444,8 +444,8 @@ function parseDfOutput(output: string): { used: number; total: number } {
|
||||
.map((x) => x.split(/\s+/))
|
||||
const index = lines.splice(0, 1)[0].map((x) => x.toLowerCase())
|
||||
const usedIndex = index.indexOf("used")
|
||||
const availableIndex = index.indexOf("available")
|
||||
const sizeIndex = index.indexOf("size")
|
||||
const used = lines.map((x) => Number.parseInt(x[usedIndex]))[0] || 0
|
||||
const total = lines.map((x) => Number.parseInt(x[availableIndex]))[0] || 0
|
||||
const total = lines.map((x) => Number.parseInt(x[sizeIndex]))[0] || 0
|
||||
return { used, total }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user