Skip to content

Commit

Permalink
remove nones from paths (#11893)
Browse files Browse the repository at this point in the history
  • Loading branch information
czoido authored Aug 17, 2022
1 parent e2dfe16 commit ebb9b1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conans/model/build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self):

def _filter_paths(self, paths):
abs_paths = [os.path.join(self.rootpath, p)
if not os.path.isabs(p) else p for p in paths]
if not os.path.isabs(p) else p for p in paths if p is not None]
if self.filter_empty:
return [p for p in abs_paths if os.path.isdir(p)]
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,3 +504,15 @@ def build(self):
self.assertIn("conanfile.py (pkg/1.0): GTEST_INFO: GTest", client.out)
self.assertIn("conanfile.py (pkg/1.0): GTEST_FILEINFO: GtesT", client.out)

def test_none_folders(self):
# https://github.com/conan-io/conan/issues/11856
client = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
class pkgConan(ConanFile):
def package_info(self):
self.cpp_info.resdirs = [None]
""")
client.save({"conanfile.py": conanfile})
client.run("create . pkg/1.0@")
assert "Created package revision" in client.out

0 comments on commit ebb9b1d

Please sign in to comment.