mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Fix homebrew using old status messages
This commit is contained in:
parent
76ff6adcd1
commit
c15e14d58c
1 changed files with 11 additions and 6 deletions
|
|
@ -54,7 +54,7 @@ class MakeHomebrewList {
|
|||
this.allFormulae = null
|
||||
}
|
||||
|
||||
getStatusText (formula) {
|
||||
getStatusText ( formula ) {
|
||||
// Match status to Sheet Status
|
||||
return statusesMessages[formula.status]
|
||||
}
|
||||
|
|
@ -76,8 +76,11 @@ class MakeHomebrewList {
|
|||
}
|
||||
|
||||
formulaIsNative (formulae) {
|
||||
// Search Formulae from Homebrew API
|
||||
const formulaData = this.allFormulae[formulae.fullName] || this.searchFormulaeForName(formulae.name)
|
||||
|
||||
// console.log('formulae.fullName', formulae.fullName)
|
||||
|
||||
// If this formula doesn't exist
|
||||
// then return false
|
||||
if (formulaData !== Object(formulaData)) {
|
||||
|
|
@ -95,11 +98,6 @@ class MakeHomebrewList {
|
|||
}
|
||||
|
||||
parseStatus (formulae) {
|
||||
// If an ARM 64 formula exists then it's native
|
||||
if (this.formulaIsNative(formulae)) {
|
||||
return 'native'
|
||||
}
|
||||
|
||||
// Match status to Sheet Status
|
||||
return statusesTranslations[formulae.status]
|
||||
}
|
||||
|
|
@ -190,6 +188,13 @@ class MakeHomebrewList {
|
|||
|
||||
// if (formulaeRow.links.length !== 0) console.log('formulaeRow', formulaeRow.links)
|
||||
|
||||
const isNativeInApi = this.formulaIsNative(formulaeRow)
|
||||
|
||||
if (isNativeInApi) {
|
||||
// Update status
|
||||
formulaeRow.status = '🥇'
|
||||
}
|
||||
|
||||
return formulaeRow
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue