lib/shelly/cli/main.rb in shelly-0.0.41.pre vs lib/shelly/cli/main.rb in shelly-0.0.41

- old
+ new

@@ -58,16 +58,11 @@ raise Errno::ENOENT, user.ssh_key_path unless user.ssh_key_exists? user.email = email || ask_for_email user.password = ask_for_password(:with_confirmation => false) user.login say "Login successful" - # FIXME: remove conflict boolean, move it to rescue block - begin user.upload_ssh_key - conflict = false - rescue RestClient::Conflict - conflict = true - end - say "Uploading your public SSH key" if conflict == false + user.upload_ssh_key + say "Uploading your public SSH key" list rescue Client::APIError => e if e.validation? e.each_error { |error| say_error "#{error}", :with_exit => false } end