Print 7za/unrar output on failure
This commit is contained in:
parent
777d0766ca
commit
971d7d41e0
6
arch.go
6
arch.go
@ -48,7 +48,8 @@ func Compress(archPath, contentDir string) error {
|
||||
)
|
||||
|
||||
log.Printf("compressing %s...", archPath)
|
||||
if err := toolCmd.Run(); err != nil {
|
||||
if output, err := toolCmd.CombinedOutput(); err != nil {
|
||||
fmt.Println(string(output))
|
||||
return errors.Join(fmt.Errorf("compression of %s failed", archPath), err)
|
||||
}
|
||||
|
||||
@ -91,7 +92,8 @@ func Decompress(archPath string, allocator *TempDirAllocator) (string, error) {
|
||||
toolCmd.Dir = contentDir
|
||||
|
||||
log.Printf("decompressing %s...", archPath)
|
||||
if err := toolCmd.Run(); err != nil {
|
||||
if output, err := toolCmd.CombinedOutput(); err != nil {
|
||||
fmt.Println(string(output))
|
||||
return "", errors.Join(fmt.Errorf("decompression of %s failed", archPath), err)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user