projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow control of where KDM CLI's output goes.
[dcpomatic.git]
/
src
/
tools
/
dcpomatic_kdm_cli.cc
diff --git
a/src/tools/dcpomatic_kdm_cli.cc
b/src/tools/dcpomatic_kdm_cli.cc
index 9c8c16aef49b72584d7fe0fb7cf78fc171e28821..04f102cf192d28e87108dfe164dfdee255507c85 100644
(file)
--- a/
src/tools/dcpomatic_kdm_cli.cc
+++ b/
src/tools/dcpomatic_kdm_cli.cc
@@
-25,11
+25,18
@@
#include "lib/kdm_cli.h"
#include "lib/kdm_cli.h"
+#include <iostream>
int
main (int argc, char* argv[])
{
int
main (int argc, char* argv[])
{
- return kdm_cli (argc, argv);
+ auto error = kdm_cli (argc, argv, [](std::string s) { std::cout << s << "\n"; });
+ if (error) {
+ std::cerr << *error << "\n";
+ exit (EXIT_FAILURE);
+ }
+
+ return 0;
}
}