fix: dsn can not empty

This commit is contained in:
Alex Duan 2023-10-25 21:18:31 +08:00
parent 368c6d996b
commit 1878e2955a
1 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ void shellCheckConnectMode() {
}
if (shell.args.cloud) {
shell.args.dsn = getenv("TDENGINE_CLOUD_DSN");
if (shell.args.cloud_dsn) {
if (shell.args.dsn && strlen(shell.args.dsn) > 4) {
shell.args.cloud = true;
shell.args.local = false;
shell.args.restful = false;
@ -138,7 +138,7 @@ void shellCheckConnectMode() {
}
shell.args.dsn = getenv("TDENGINE_DSN");
if (shell.args.dsn) {
if (shell.args.dsn && strlen(shell.args.dsn) > 4) {
shell.args.cloud = true;
shell.args.local = true;
shell.args.restful = false;