提交 2ed0e8fb 编写于 作者: wafwerar's avatar wafwerar

fix: shell source error

上级 10b184cc
......@@ -192,9 +192,15 @@ static int32_t shellRunSingleCommand(TAOS *con, char *command) {
if (regex_match(command, "^[ \t]*source[\t ]+[^ ]+[ \t;]*$", REG_EXTENDED | REG_ICASE)) {
/* If source file. */
char *c_ptr = strtok(command, " ;");
assert(c_ptr != NULL);
if (c_ptr == NULL) {
shellRunCommandOnServer(con, command);
return 0;
}
c_ptr = strtok(NULL, " ;");
assert(c_ptr != NULL);
if (c_ptr == NULL) {
shellRunCommandOnServer(con, command);
return 0;
}
source_file(con, c_ptr);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册