[all-commits] [llvm/llvm-project] 0ec88d: [lldb] Inherit host environment when running shell...

Pavel Labath via All-commits all-commits at lists.llvm.org
Wed Apr 1 02:25:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ec88d031ad5abcd78068a8377494ec84ea6a1e1
      https://github.com/llvm/llvm-project/commit/0ec88d031ad5abcd78068a8377494ec84ea6a1e1
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M lldb/source/Host/common/Host.cpp
    A lldb/test/API/python_api/sbplatform/Makefile
    A lldb/test/API/python_api/sbplatform/TestSBPlatform.py
    A lldb/test/API/python_api/sbplatform/main.cpp

  Log Message:
  -----------
  [lldb] Inherit host environment when running shell commands

Summary:
On most hosts we were running shell commands with an empty environment.
The only exception was windows, which was inheriting the host enviroment
mostly by accident.

Running the commands in an empty environment does not sound like a
sensible default, so this patch changes Host::RunShellCommand to inherit
the host environment.  This impacts both commands run via
SBPlatform::Run (in case of host platforms), as well as the "platform
shell" CLI command.

Reviewers: jingham, friss

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D77123




More information about the All-commits mailing list