[PATCH] D38115: [lit/Win] Check if a path was found before attempting to use it.

David L. Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 18:27:59 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL313854: [lit/Win] Check if a path was found before attempting to use it. (authored by dlj).

Repository:
  rL LLVM

https://reviews.llvm.org/D38115

Files:
  llvm/trunk/utils/lit/lit/llvm/config.py


Index: llvm/trunk/utils/lit/lit/llvm/config.py
===================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py
+++ llvm/trunk/utils/lit/lit/llvm/config.py
@@ -27,7 +27,8 @@
             path = self.lit_config.getToolsPath(config.lit_tools_dir,
                                            config.environment['PATH'],
                                            ['cmp.exe', 'grep.exe', 'sed.exe'])
-            self.with_environment('PATH', path, append_path=True)
+            if path is not None:
+                self.with_environment('PATH', path, append_path=True)
             self.use_lit_shell = True
 
         # Choose between lit's internal shell pipeline runner and a real shell.  If


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38115.116131.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170921/938e906e/attachment.bin>


More information about the llvm-commits mailing list