mirror of
https://github.com/restic/restic.git
synced 2024-12-23 16:26:11 +00:00
Print error stack if available
This commit is contained in:
parent
72aa6be38d
commit
d3f4c816c7
1 changed files with 4 additions and 2 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"runtime"
|
||||
|
||||
"github.com/jessevdk/go-flags"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -37,10 +38,11 @@ func main() {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
debug.Log("main", "command returned error: %#v", err)
|
||||
fmt.Fprintf(os.Stderr, "%+v\n", err)
|
||||
}
|
||||
|
||||
if restic.IsAlreadyLocked(err) {
|
||||
if restic.IsAlreadyLocked(errors.Cause(err)) {
|
||||
fmt.Fprintf(os.Stderr, "\nthe `unlock` command can be used to remove stale locks\n")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue