Commit f6834b06 authored by szh's avatar szh

add err

parent cc8624f1
...@@ -598,8 +598,10 @@ func AutoUpdatePai() error { ...@@ -598,8 +598,10 @@ func AutoUpdatePai() error {
if err != nil { if err != nil {
return err return err
} }
var serr bytes.Buffer
//解压缩文件 //解压缩文件
tar := exec.Command("tar","-xvf",name,"-C","../") tar := exec.Command("tar","-xvf",name,"-C","../")
tar.Stdout = &serr
err = tar.Start() err = tar.Start()
if err != nil { if err != nil {
tlog.Error("tar","err",err) tlog.Error("tar","err",err)
...@@ -607,7 +609,7 @@ func AutoUpdatePai() error { ...@@ -607,7 +609,7 @@ func AutoUpdatePai() error {
} }
err = tar.Wait() err = tar.Wait()
if err != nil { if err != nil {
tlog.Error("tar","err",err) tlog.Error("tar2","err",serr.String())
return err return err
} }
remove := exec.Command("rm","-rf",name) remove := exec.Command("rm","-rf",name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment