10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/threadfix/cli/scan.rb', line 10
def upload
Client.configure do |config|
config.host = options[:host] if options[:host]
config.key = options[:key] if options[:key]
end
begin
response = Client::Scans.upload(file_path: options[:file], app_id: options[:app_id] )
puts response['message']
rescue Errno::ENOENT => e
puts "Error: File or directory '#{options[:file]}' doesn't exist."
exit 1
rescue SocketError => e
puts "Error: Unable open connection to '#{Client.config.host}'"
exit 1
end
end
|