mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 01:44:52 +01:00
cli: return error status if compaction fails
As is customary for any tool.
This commit is contained in:
parent
00d2ac2b41
commit
d34be29a41
1 changed files with 10 additions and 9 deletions
|
@ -43,7 +43,9 @@ notmuch_compact_command (notmuch_config_t *config,
|
|||
ret = notmuch_database_compact (path, backup_path, status_update_cb, NULL);
|
||||
if (ret) {
|
||||
fprintf (stderr, "Compaction failed: %s\n", notmuch_status_to_string(ret));
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf ("\n");
|
||||
printf ("\n");
|
||||
printf ("The old database has been moved to %s", backup_path);
|
||||
|
@ -52,7 +54,6 @@ notmuch_compact_command (notmuch_config_t *config,
|
|||
printf ("\n");
|
||||
printf (" rm -R %s\n", backup_path);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue