commands/remove-key.rb in hubbard-0.0.16 vs commands/remove-key.rb in hubbard-0.0.18

- old
+ new

@@ -1,21 +1,18 @@ name = next_arg("Please specify the key name") if name !~ Hubbard::KEY_NAME_REGEX - $stderr.puts "Not a valid key name (letters and numbers only)" - exit 1 + error 1, "Not a valid key name (letters and numbers only)" end dirname = File.join(find_account_dir(@username), "keys") FileUtils.mkdir_p(dirname) filename = File.join(dirname, name) if !File.exist?(filename) - $stderr.puts "Key not found" - exit 1 + error 1, "Key not found" end unless FileUtils.rm(filename) - $stderr.puts "Unable to delete key" - exit 1 + error 1, "Unable to delete key" end sync_keys