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
def self.has_qemu
`qemu-arm -version`
return false unless $?.exitstatus == 0
`arm-linux-gnu-ld -v`
return false unless $?.exitstatus == 0
qemu = "qemu-arm"
linker = "arm-linux-gnuabi-ld"
if `uname -a`.include?("torsten")
qemu = "qemu-arm"
linker = "arm-linux-gnu-ld"
#return false
end
begin
`#{qemu} -version`
`#{linker} -v`
rescue => e
puts e
return false
end
true
end