MCPcopy Create free account
hub / github.com/catboost/catboost / GetQuotedCommand

Method GetQuotedCommand

util/system/shellcommand.cpp:626–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626TString TShellCommand::TImpl::GetQuotedCommand() const {
627 TString quoted = Command; /// @todo command itself should be quoted too
628 for (const auto& argument : Arguments) {
629 // Don't add unnecessary quotes. It's especially important for the windows with a 32k command line length limit.
630 if (Options_.QuoteArguments && ArgNeedsQuotes(argument)) {
631 ::ShellQuoteArgSp(quoted, argument);
632 } else {
633 quoted.append(" ").append(argument);
634 }
635 }
636 return quoted;
637}
638
639#if defined(_unix_)
640void TShellCommand::TImpl::OnFork(TPipes& pipes, sigset_t oldmask, char* const* argv, char* const* envp, const std::function<void()>& afterFork) const {

Callers 1

Y_UNIT_TESTFunction · 0.80

Calls 3

ArgNeedsQuotesFunction · 0.85
ShellQuoteArgSpFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected