9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/easy_creds/actions/local/delete.rb', line 9
def self.call(ctx)
env = ctx.env
Theme.section("Local overlay — delete #{env}_local")
enc_exists = ctx.io.enc_exists?(env, local: true)
key_exists = ctx.io.key_exists?(env, local: true)
return Theme.notice("No local overlay files found for #{env}.") unless enc_exists || key_exists
preview_files(env, enc_exists, key_exists)
return Theme.notice('Cancelled') unless ctx.prompt.yes?('Are you sure?', default: false)
perform_delete(Pathname.new(ctx.root), env, enc_exists, key_exists)
end
|