Skip to content

Commit ff6e482

Browse files
committed
portal print cli
1 parent 83ce5e0 commit ff6e482

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/omnipackage_agent/config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def initialize(hash, attributes = ATTRIBUTES) # rubocop: disable Metrics/MethodL
6464

6565
def auto_detect_container_runtime
6666
possibilities = %w[podman docker]
67-
possibilities.find { |cmd| system("#{cmd} &> /dev/null") } || (raise "you have to install #{possibilities.join(' or ')}")
67+
possibilities.find { |cmd| system("#{cmd} --version &> /dev/null") } || (raise "you have to install #{possibilities.join(' or ')}")
6868
end
6969
end
7070
end

lib/omnipackage_agent/portal.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ def initialize(config:)
1616

1717
def call(distro_name)
1818
distro = ::OmnipackageAgent::Distro.new(distro_name)
19-
system("#{config.container_runtime} run -it --rm --mount type=bind,source=#{config.build_dir},target=#{mountpoint},readonly -w #{mountpoint} #{distro.image}")
19+
cli = "#{config.container_runtime} run -it --rm --mount type=bind,source=#{config.build_dir},target=#{mountpoint},readonly -w #{mountpoint} #{distro.image}"
20+
puts '-----'
21+
puts cli
22+
puts '-----'
23+
system(cli)
2024
end
2125
end
2226
end

0 commit comments

Comments
 (0)