buildsystem: Use native ruby block in install_extras (#10110)

* buildsystem: Use native ruby block in `install_extras`

Signed-off-by: supechicken <me@supechicken666.dev>

* Make rubocop happy, disable `Security/Eval` cop

Signed-off-by: supechicken <me@supechicken666.dev>

---------

Signed-off-by: supechicken <me@supechicken666.dev>
This commit is contained in:
SupeChicken666
2024-07-09 21:56:03 +08:00
committed by GitHub
parent fad195cada
commit f9738c639d
12 changed files with 21 additions and 19 deletions

View File

@@ -42,6 +42,6 @@ class Pip < Package
FileUtils.mkdir_p File.dirname(@destpath) if Gem::Version.new(RUBY_VERSION.to_s) < Gem::Version.new('3.3')
FileUtils.install @pip_path, @destpath
end
eval @pip_install_extras if @pip_install_extras
@pip_install_extras&.call
end
end