summaryrefslogtreecommitdiffstats
path: root/sinksh/syntaxtree.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-11-01 23:28:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-11-01 23:28:08 +0100
commit1b8eb3b19a8793fb225bdc785ebc10bea63bbb36 (patch)
tree54cd7fe526535df88c9ee1faa10aa3fce6f1a076 /sinksh/syntaxtree.cpp
parente1a3aebafca9a9447a393100db4fc45943551630 (diff)
downloadsink-1b8eb3b19a8793fb225bdc785ebc10bea63bbb36.tar.gz
sink-1b8eb3b19a8793fb225bdc785ebc10bea63bbb36.zip
Ensure we get a return code
Diffstat (limited to 'sinksh/syntaxtree.cpp')
-rw-r--r--sinksh/syntaxtree.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sinksh/syntaxtree.cpp b/sinksh/syntaxtree.cpp
index 65eb769..0eb9782 100644
--- a/sinksh/syntaxtree.cpp
+++ b/sinksh/syntaxtree.cpp
@@ -68,6 +68,9 @@ int SyntaxTree::run(const QStringList &commands)
68 if (success && command.first->interactivity == Syntax::EventDriven) { 68 if (success && command.first->interactivity == Syntax::EventDriven) {
69 returnCode = m_state.commandStarted(); 69 returnCode = m_state.commandStarted();
70 } 70 }
71 if (!success && command.first->interactivity != Syntax::EventDriven) {
72 returnCode = 1;
73 }
71 } else if (command.first->children.isEmpty()) { 74 } else if (command.first->children.isEmpty()) {
72 m_state.printError(QObject::tr("Broken command... sorry :("), "st_broken"); 75 m_state.printError(QObject::tr("Broken command... sorry :("), "st_broken");
73 } else { 76 } else {