diff options
Diffstat (limited to 'sinksh/syntax_modules')
-rw-r--r-- | sinksh/syntax_modules/sink_sync.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sinksh/syntax_modules/sink_sync.cpp b/sinksh/syntax_modules/sink_sync.cpp index 2800af1..8b48785 100644 --- a/sinksh/syntax_modules/sink_sync.cpp +++ b/sinksh/syntax_modules/sink_sync.cpp | |||
@@ -67,12 +67,14 @@ bool sync(const QStringList &args, State &state) | |||
67 | Sink::Store::synchronize(query) | 67 | Sink::Store::synchronize(query) |
68 | .then(Sink::ResourceControl::flushMessageQueue(query.getResourceFilter().ids)) | 68 | .then(Sink::ResourceControl::flushMessageQueue(query.getResourceFilter().ids)) |
69 | .then([state](const KAsync::Error &error) { | 69 | .then([state](const KAsync::Error &error) { |
70 | int exitCode = 0; | ||
70 | if (error) { | 71 | if (error) { |
71 | state.printLine("Synchronization failed!"); | 72 | state.printLine("Synchronization failed!"); |
73 | exitCode = 1; | ||
72 | } else { | 74 | } else { |
73 | state.printLine("Synchronization complete!"); | 75 | state.printLine("Synchronization complete!"); |
74 | } | 76 | } |
75 | state.commandFinished(); | 77 | state.commandFinished(exitCode); |
76 | }).exec(); | 78 | }).exec(); |
77 | 79 | ||
78 | return true; | 80 | return true; |