diff options
author | pnv1 <pnv1@yandex-team.ru> | 2022-02-11 23:52:39 +0300 |
---|---|---|
committer | pnv1 <pnv1@yandex-team.ru> | 2022-02-11 23:52:39 +0300 |
commit | 44e74dcc32529fbf72c6ded1de65d288a81231ce (patch) | |
tree | 7d23f402c9be44fff21cd9e62e978b796f47296b | |
parent | 3ab6c0efc3b723aba302dec5243fe8868b330cde (diff) | |
download | ydb-44e74dcc32529fbf72c6ded1de65d288a81231ce.tar.gz |
Make "ydb init" count as a system command instead of just "init", KIKIMR-14321
ref:8395d7b77e13fc9eb9b67bb5e0b1d18b4fedd807
-rw-r--r-- | ydb/public/lib/ydb_cli/common/command.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ydb/public/lib/ydb_cli/common/command.h b/ydb/public/lib/ydb_cli/common/command.h index 441206cdf7b..bf49aa830c7 100644 --- a/ydb/public/lib/ydb_cli/common/command.h +++ b/ydb/public/lib/ydb_cli/common/command.h @@ -162,8 +162,11 @@ public: bool IsInitCommand() { TString lastArg = ArgV[ArgC - 1]; - if (lastArg == "init") { - return true; + if (lastArg == "init" && ArgC > 1) { + TString penultimateArg = ArgV[ArgC - 2]; + if (penultimateArg.StartsWith("ydb")) { + return true; + } } return false; } |