Module: Arcanus::Command::Shared::EnsureKey

Included in:
Diff, Edit, Export, Arcanus::Command::Show
Defined in:
lib/arcanus/command/shared/ensure_key.rb

Instance Method Summary collapse

Instance Method Details

#ensure_key_unlockedObject

Ensures the key is unlocked


4
5
6
7
8
9
10
11
12
# File 'lib/arcanus/command/shared/ensure_key.rb', line 4

def ensure_key_unlocked
  if !repo.has_locked_key?
    execute_command(%w[setup])
    ui.newline
  elsif !repo.has_unlocked_key?
    execute_command(%w[unlock])
    ui.newline
  end
end