summaryrefslogtreecommitdiff
path: root/lib/license/finder/ext/conan.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/license/finder/ext/conan.rb')
-rw-r--r--lib/license/finder/ext/conan.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/license/finder/ext/conan.rb b/lib/license/finder/ext/conan.rb
index ca2ee03..780b205 100644
--- a/lib/license/finder/ext/conan.rb
+++ b/lib/license/finder/ext/conan.rb
@@ -6,10 +6,16 @@ module LicenseFinder
[project_path.join('conanfile.txt')]
end
- def current_packages
- stdout, _stderr, status = Dir.chdir(project_path) do
+ def prepare
+ within_project_path do
+ tool_box.install(tool: :python)
shell.execute([:conan, :install, '--build=missing', '.'], env: default_env)
shell.execute([:conan, :inspect, '.'], env: default_env)
+ end
+ end
+
+ def current_packages
+ stdout, _stderr, status = within_project_path do
shell.execute([:conan, :info, '-j', '/dev/stdout', '.'], env: default_env)
end
return [] unless status.success?