Skip to content

Commit

Permalink
B #4982: return error in case info fails (#100)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4afb89c)
  • Loading branch information
Alejandro Huertas Herrero authored and rsmontero committed Apr 13, 2021
1 parent 166f5e9 commit 2eddc2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cli/onevm
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,12 @@ CommandParser::CmdParser.new(ARGV) do
helper.perform_action(args[0], options,
'Updating VM configuration') do |vm|
if template.empty?
vm.info
rc = vm.info

if OpenNebula.is_error?(rc)
STDERR.puts "ERROR: #{rc.message}"
exit(-1)
end

template = vm.template_like_str('TEMPLATE', true,
'OS | FEATURES | INPUT | '\
Expand Down

0 comments on commit 2eddc2b

Please sign in to comment.