mirror of https://github.com/perkeep/perkeep.git
camput: use Errorf to print critical errors even when non-verbose
http://camlistore.org/issue/524 Change-Id: Ied24471288ea459785291281afa7316a257b6884
This commit is contained in:
parent
9b6a9c587a
commit
250664d8eb
|
@ -100,7 +100,7 @@ func initUploader() {
|
|||
|
||||
func handleResult(what string, pr *client.PutResult, err error) error {
|
||||
if err != nil {
|
||||
log.Printf("Error putting %s: %s", what, err)
|
||||
cmdmain.Errorf("Error putting %s: %s\n", what, err)
|
||||
cmdmain.ExitWithFailure = true
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ func Main() {
|
|||
if err != nil {
|
||||
if !ExitWithFailure {
|
||||
// because it was already logged if ExitWithFailure
|
||||
log.Printf("Error: %v", err)
|
||||
Errorf("Error: %v\n", err)
|
||||
}
|
||||
Exit(2)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue