mirror of
https://gitee.com/goploy/goploy.git
synced 2024-11-29 18:57:59 +08:00
Added err detail
This commit is contained in:
parent
c0c9eb105d
commit
2d5fec2013
@ -26,7 +26,7 @@ func (git *GIT) Run(operator string, options ...string) error {
|
|||||||
cmd.Stdout = &git.Output
|
cmd.Stdout = &git.Output
|
||||||
cmd.Stderr = &git.Err
|
cmd.Stderr = &git.Err
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
return fmt.Errorf("error: %s, detail: %s", err, git.Err.String())
|
return fmt.Errorf("error: %s, detail: %s, command: %s, paste it to command-line to check if it is correct", err, git.Err.String(), cmd.String())
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ package pkg
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ func (svn *SVN) Run(operator string, options ...string) error {
|
|||||||
cmd.Stdout = &svn.Output
|
cmd.Stdout = &svn.Output
|
||||||
cmd.Stderr = &svn.Err
|
cmd.Stderr = &svn.Err
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
return err
|
return fmt.Errorf("error: %s, detail: %s, command: %s, paste it to command-line to check if it is correct", err, svn.Err.String(), cmd.String())
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user