diff options
-rw-r--r-- | adb/commandline.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/adb/commandline.cpp b/adb/commandline.cpp index c13872a3b..73c8912bd 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp | |||
@@ -591,14 +591,15 @@ static std::string ShellServiceString(bool use_shell_protocol, | |||
591 | std::vector<std::string> args; | 591 | std::vector<std::string> args; |
592 | if (use_shell_protocol) { | 592 | if (use_shell_protocol) { |
593 | args.push_back(kShellServiceArgShellProtocol); | 593 | args.push_back(kShellServiceArgShellProtocol); |
594 | |||
595 | const char* terminal_type = getenv("TERM"); | ||
596 | if (terminal_type != nullptr) { | ||
597 | args.push_back(std::string("TERM=") + terminal_type); | ||
598 | } | ||
594 | } | 599 | } |
595 | if (!type_arg.empty()) { | 600 | if (!type_arg.empty()) { |
596 | args.push_back(type_arg); | 601 | args.push_back(type_arg); |
597 | } | 602 | } |
598 | const char* terminal_type = getenv("TERM"); | ||
599 | if (terminal_type != nullptr) { | ||
600 | args.push_back(std::string("TERM=") + terminal_type); | ||
601 | } | ||
602 | 603 | ||
603 | // Shell service string can look like: shell[,arg1,arg2,...]:[command]. | 604 | // Shell service string can look like: shell[,arg1,arg2,...]:[command]. |
604 | return android::base::StringPrintf("shell%s%s:%s", | 605 | return android::base::StringPrintf("shell%s%s:%s", |