Sha256: b052c25bdab24c627cf337c6c0da3299c95ac9e85904393d3459afaff2b20adc

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

name = next_arg("Please specify the key name")
if name !~ Hubbard::KEY_NAME_REGEX
  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)
  error 1, "Key not found"
end

unless FileUtils.rm(filename)
  error 1, "Unable to delete key"
end

sync_keys

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hubbard-0.0.18 commands/remove-key.rb