“2372e4decc278be058a643376eb498213081365b”上不存在“src/git@gitcode.net:qq_37101384/tdengine.git”
提交 59d70252 编写于 作者: S Shengliang Guan

fix(tools): repair -p options in shell

上级 add448b3
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
set -e set -e
#python3 ./test.py -f 2-query/between.py #python3 ./test.py -f 2-query/between.py
python3 ./test.py -f 2-query/distinct.py #python3 ./test.py -f 2-query/distinct.py
python3 ./test.py -f 2-query/varchar.py python3 ./test.py -f 2-query/varchar.py
python3 ./test.py -f 2-query/cast.py python3 ./test.py -f 2-query/cast.py
...@@ -189,7 +189,7 @@ static struct argp_option shellOptions[] = { ...@@ -189,7 +189,7 @@ static struct argp_option shellOptions[] = {
{"host", 'h', "HOST", 0, SHELL_HOST}, {"host", 'h', "HOST", 0, SHELL_HOST},
{"port", 'P', "PORT", 0, SHELL_PORT}, {"port", 'P', "PORT", 0, SHELL_PORT},
{"user", 'u', "USER", 0, SHELL_USER}, {"user", 'u', "USER", 0, SHELL_USER},
{"password", 'p', 0, 0, SHELL_PASSWORD}, {0, 'p', 0, 0, SHELL_PASSWORD},
{"auth", 'a', "AUTH", 0, SHELL_AUTH}, {"auth", 'a', "AUTH", 0, SHELL_AUTH},
{"generate-auth", 'A', 0, 0, SHELL_GEN_AUTH}, {"generate-auth", 'A', 0, 0, SHELL_GEN_AUTH},
{"config-dir", 'c', "DIR", 0, SHELL_CFG_DIR}, {"config-dir", 'c', "DIR", 0, SHELL_CFG_DIR},
...@@ -220,9 +220,9 @@ static void shellParseArgsUseArgp(int argc, char *argv[]) { ...@@ -220,9 +220,9 @@ static void shellParseArgsUseArgp(int argc, char *argv[]) {
static void shellInitArgs(int argc, char *argv[]) { static void shellInitArgs(int argc, char *argv[]) {
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
if ((strncmp(argv[i], "-p", 2) == 0) || (strncmp(argv[i], "--password", 10) == 0)) { if (strncmp(argv[i], "-p", 2) == 0) {
printf(shell.info.clientVersion, tsOsName, taos_get_client_info()); printf(shell.info.clientVersion, tsOsName, taos_get_client_info());
if ((strlen(argv[i]) == 2) || (strncmp(argv[i], "--password", 10) == 0)) { if (strlen(argv[i]) == 2) {
printf("Enter password: "); printf("Enter password: ");
taosSetConsoleEcho(false); taosSetConsoleEcho(false);
if (scanf("%20s", shell.args.password) > 1) { if (scanf("%20s", shell.args.password) > 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册