mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Show alpm warnings
This commit is contained in:
parent
f4aa7f7933
commit
42a74c41c5
2 changed files with 10 additions and 0 deletions
|
@ -85,3 +85,12 @@ func questionCallback(question alpm.QuestionAny) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func logCallback(level alpm.LogLevel, str string) {
|
||||
switch level {
|
||||
case alpm.LogWarning:
|
||||
fmt.Print(bold(yellow(smallArrow)), " ", str)
|
||||
case alpm.LogError:
|
||||
fmt.Print(bold(red(smallArrow)), " ", str)
|
||||
}
|
||||
}
|
||||
|
|
1
main.go
1
main.go
|
@ -191,6 +191,7 @@ func initAlpmHandle() (err error) {
|
|||
}
|
||||
|
||||
alpmHandle.SetQuestionCallback(questionCallback)
|
||||
alpmHandle.SetLogCallback(logCallback)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue