From 579d5c0bdcf945d5a7db237a35dd82e51fee40f6 Mon Sep 17 00:00:00 2001 From: nerix Date: Sat, 8 Feb 2025 20:39:10 +0100 Subject: [PATCH] fix(eventsub): don't require pip if venv works (#5935) --- CHANGELOG.md | 2 +- lib/twitch-eventsub-ws/cmake/GenerateJson.cmake | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 863091d5..ce3a8442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ - Bugfix: Fixed the reply button showing for inline whispers and announcements. (#5863) - Bugfix: Fixed suspicious user treatment update messages not being searchable. (#5865) - Bugfix: Ensure miniaudio backend exits even if it doesn't exit cleanly. (#5896) -- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930) +- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930, #5935) - Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784) - Dev: Removed unused PubSub whisper code. (#5898) - Dev: Updated Conan dependencies. (#5776) diff --git a/lib/twitch-eventsub-ws/cmake/GenerateJson.cmake b/lib/twitch-eventsub-ws/cmake/GenerateJson.cmake index 80587ee4..4cfed82a 100644 --- a/lib/twitch-eventsub-ws/cmake/GenerateJson.cmake +++ b/lib/twitch-eventsub-ws/cmake/GenerateJson.cmake @@ -49,10 +49,13 @@ function(_make_and_use_venv) message(STATUS "Installing requirements from ${arg_REQUIREMENTS}") execute_process( COMMAND "${Python3_EXECUTABLE}" -m pip install -r "${arg_REQUIREMENTS}" - COMMAND_ERROR_IS_FATAL ANY + RESULT_VARIABLE _pip_output OUTPUT_QUIET ERROR_QUIET ) + if(NOT _pip_output EQUAL 0) + return() + endif() set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${arg_REQUIREMENTS}") set(${arg_OUT_PYTHON_EXE} "${Python3_EXECUTABLE}" PARENT_SCOPE)