Skip to content

Commit 45c6d78

Browse files
author
Bastian Schmidt
committed
Move capability check
1 parent 5180449 commit 45c6d78

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/proxy/archive_extract.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ def start
2929
end
3030
end
3131
end
32+
33+
def self.has_capability?
34+
which(SHELL_COMMAND) ? 'extraction' : nil
35+
end
3236
end
3337
end

modules/tftp/tftp_plugin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Plugin < ::Proxy::Plugin
1111
validate :verify_server_cert, boolean: true
1212

1313
# Expose automatic iso handling capability
14-
capability -> { which(Proxy::ArchiveExtract::SHELL_COMMAND) ? 'extraction' : nil }
14+
capability -> { Proxy::ArchiveExtract.has_capability? }
1515

1616
expose_setting :tftp_servername
1717
end

0 commit comments

Comments
 (0)