progress: tweak progress error reporting
This commit adds catpure of os.Std{out,err} when running osbuild so
that we capture the error log and can display it as part of
an error from osbuild, e.g. when osbuild itself crashes.
This gives us more accurate error reporting if anything fails
during the osbuild building.
This commit is contained in:
parent
9ac654a7b1
commit
655b6bbd0f
3 changed files with 41 additions and 14 deletions
|
|
@ -25,3 +25,11 @@ func MockIsattyIsTerminal(fn func(uintptr) bool) (restore func()) {
|
|||
isattyIsTerminal = saved
|
||||
}
|
||||
}
|
||||
|
||||
func MockOsbuildCmd(s string) (restore func()) {
|
||||
saved := osbuildCmd
|
||||
osbuildCmd = s
|
||||
return func() {
|
||||
osbuildCmd = saved
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue