Browse Source

Retcode for command as argument

Serj Kalichev 11 years ago
parent
commit
fc07c21172
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bin/clish.c

+ 3 - 1
bin/clish.c

@@ -307,7 +307,9 @@ int main(int argc, char **argv)
 		for(iter = lub_list__get_head(cmds);
 			iter; iter = lub_list_node__get_next(iter)) {
 			char *str = (char *)lub_list_node__get_data(iter);
-			clish_shell_forceline(shell, str, NULL);
+			result = clish_shell_forceline(shell, str, NULL);
+			if (stop_on_error && result)
+				break;
 		}
 	} else {
 		/* Main loop */