Backticks raise exception, who knew

catching and tryig different exe name
This commit is contained in:
Torsten Rüger 2019-08-18 15:22:09 +03:00
parent c9d77a29b2
commit 02a4742cc2

View File

@ -28,10 +28,20 @@ module Mains
end end
def self.has_qemu def self.has_qemu
`qemu-arm -version` qemu = "qemu-arm"
return false unless $?.exitstatus == 0 linker = "arm-linux-gnuabi-ld"
`arm-linux-gnu-ld -v` if `uname -a`.include?("torsten")
return false unless $?.exitstatus == 0 qemu = "qemu-arm"
linker = "arm-linux-gnu-ld"
#return false
end
begin
`#{qemu} -version`
`#{linker} -v`
rescue => e
puts e
return false
end
true true
end end