aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/shellcommand.cpp
diff options
context:
space:
mode:
authormelkov <melkov@yandex-team.ru>2022-02-10 16:48:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:13 +0300
commit438546c8737d5c1fdeb31157dcf999717d930eec (patch)
treed29d229abd2f9f889b9b7eb148d635059dc26acf /util/system/shellcommand.cpp
parent96647fad5355ff5ef45a00a6d85c097028584ab0 (diff)
downloadydb-438546c8737d5c1fdeb31157dcf999717d930eec.tar.gz
Restoring authorship annotation for <melkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/shellcommand.cpp')
-rw-r--r--util/system/shellcommand.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp
index b1989b5c8c..4200491e2e 100644
--- a/util/system/shellcommand.cpp
+++ b/util/system/shellcommand.cpp
@@ -628,22 +628,22 @@ void TShellCommand::TImpl::StartProcess(TShellCommand::TImpl::TPipes& pipes) {
#endif
void ShellQuoteArg(TString& dst, TStringBuf argument) {
- dst.append("\"");
- TStringBuf l, r;
+ dst.append("\"");
+ TStringBuf l, r;
while (argument.TrySplit('"', l, r)) {
- dst.append(l);
- dst.append("\\\"");
+ dst.append(l);
+ dst.append("\\\"");
argument = r;
- }
+ }
dst.append(argument);
- dst.append("\"");
-}
-
+ dst.append("\"");
+}
+
void ShellQuoteArgSp(TString& dst, TStringBuf argument) {
- dst.append(' ');
+ dst.append(' ');
ShellQuoteArg(dst, argument);
-}
-
+}
+
bool ArgNeedsQuotes(TStringBuf arg) noexcept {
if (arg.empty()) {
return true;