浏览代码

Retcode for command as argument

Serj Kalichev 10 年之前
父节点
当前提交
fc07c21172
共有 1 个文件被更改,包括 3 次插入1 次删除
  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);
 		for(iter = lub_list__get_head(cmds);
 			iter; iter = lub_list_node__get_next(iter)) {
 			iter; iter = lub_list_node__get_next(iter)) {
 			char *str = (char *)lub_list_node__get_data(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 {
 	} else {
 		/* Main loop */
 		/* Main loop */