mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
bug: wrong access to exitstatus
(cherry picked from commit 1aad41ffe6990fad4f7a57d2291cb92d888216fb)
This commit is contained in:
parent
c6a8c1fbdc
commit
d582636e47
@ -53,7 +53,8 @@ module OpenNebula
|
||||
# the command fails
|
||||
def self.exec_and_log(command, message=nil)
|
||||
output=`#{command} 2>&1 1>/dev/null`
|
||||
code=$?
|
||||
code=$?.exitstatus
|
||||
|
||||
if code!=0
|
||||
log_error "Command \"#{command}\" failed."
|
||||
log_error output
|
||||
|
Loading…
x
Reference in New Issue
Block a user