Sha256: 5ba269cf72691ae7bcc9e282784d72908b4633b4c9fac37a6ae5368e299cc091
Contents?: true
Size: 557 Bytes
Versions: 6
Compression:
Stored size: 557 Bytes
Contents
module Lono::Cfn::Util def are_you_sure?(stack_name, action) if @options[:sure] sure = 'y' else message = case action when :update "Are you sure you want to want to update the #{stack_name.color(:green)} stack with the changes? (y/N)" when :delete "Are you sure you want to want to delete the #{stack_name.color(:green)} stack? (y/N)" end puts message sure = $stdin.gets end unless sure =~ /^y/ puts "Whew! Exiting without running #{action}." exit 0 end end end
Version data entries
6 entries across 6 versions & 1 rubygems