[libcxx-commits] [libcxx] d98b9a4 - [libc++] NFC: Do not print the environment on remote hosts

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 6 08:33:31 PDT 2020


Author: Louis Dionne
Date: 2020-05-06T11:33:13-04:00
New Revision: d98b9a41578f93685b1df16aa37ded893e74cf18

URL: https://github.com/llvm/llvm-project/commit/d98b9a41578f93685b1df16aa37ded893e74cf18
DIFF: https://github.com/llvm/llvm-project/commit/d98b9a41578f93685b1df16aa37ded893e74cf18.diff

LOG: [libc++] NFC: Do not print the environment on remote hosts

Running `export` when there is no environment variable to export will
cause the environment on the remote host to be printed. We don't want
that, so don't run any `export` command on the host when there's no env.

Added: 
    

Modified: 
    libcxx/utils/ssh.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ssh.py b/libcxx/utils/ssh.py
index 6329cb43923a..50c6f4526cb5 100644
--- a/libcxx/utils/ssh.py
+++ b/libcxx/utils/ssh.py
@@ -98,11 +98,10 @@ def main():
         # temporary directory, where we know they have been copied when we handled
         # test dependencies above.
         commandLine = (pathOnRemote(x) if isTestExe(x) else x for x in commandLine)
-        remoteCommands += [
-            'cd {}'.format(tmp),
-            'export {}'.format(' '.join(args.env)),
-            subprocess.list2cmdline(commandLine)
-        ]
+        remoteCommands.append('cd {}'.format(tmp))
+        if args.env:
+            remoteCommands.append('export {}'.format(' '.join(args.env)))
+        remoteCommands.append(subprocess.list2cmdline(commandLine))
 
         # Finally, SSH to the remote host and execute all the commands.
         rc = subprocess.call(ssh(' && '.join(remoteCommands)))


        


More information about the libcxx-commits mailing list