camput: use Errorf to print critical errors even when non-verbose

http://camlistore.org/issue/524

Change-Id: Ied24471288ea459785291281afa7316a257b6884
This commit is contained in:
mpl 2014-11-03 22:15:02 +01:00
parent 9b6a9c587a
commit 250664d8eb
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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)
}