Skip to content

Commit 07ed12d

Browse files
committed
fix(cmake): patch libs to list-views correctly
Signed-off-by: Roberto Scolaro <[email protected]>
1 parent e165210 commit 07ed12d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

cmake/modules/falcosecurity-libs-repo/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ ExternalProject_Add(
3030
CONFIGURE_COMMAND ""
3131
BUILD_COMMAND ""
3232
INSTALL_COMMAND ""
33-
TEST_COMMAND "")
33+
TEST_COMMAND ""
34+
PATCH_COMMAND sh -c "patch -p1 <${CMAKE_SOURCE_DIR}/chisel.patch"
35+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/userspace/chisel/chisel.cpp b/userspace/chisel/chisel.cpp
2+
index ba01ba9dd..0927372fc 100644
3+
--- a/userspace/chisel/chisel.cpp
4+
+++ b/userspace/chisel/chisel.cpp
5+
@@ -1090,9 +1090,10 @@ void sinsp_chisel::get_chisel_list(vector<chisel_desc>* chisel_descs)
6+
continue;
7+
}
8+
9+
- for (auto const& dir_entry : filesystem::directory_iterator(dir_info.m_dir))
10+
+ std::error_code ec;
11+
+ for (auto const& dir_entry : filesystem::directory_iterator(dir_info.m_dir, ec))
12+
{
13+
- if(dir_entry.path().extension() == ".lua")
14+
+ if(!ec && dir_entry.path().extension() == ".lua")
15+
{
16+
auto res = find_if(chisel_descs->begin(), chisel_descs->end(),
17+
[&dir_entry](auto& desc) { return dir_entry.path().filename() == desc.m_name; });

0 commit comments

Comments
 (0)