Method: CFnDK::GlobalConfig#post_command_execute
- Defined in:
- lib/cfndk/global_config.rb
#post_command_execute ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cfndk/global_config.rb', line 34 def post_command_execute if @post_command CFnDK.logger.info(('execute global post command: ' + @post_command).color(:green)) IO.popen(@post_command, :err => [:child, :out]) do |io| io.each_line do |line| CFnDK.logger.info((line).color(:green)) end end raise 'global post command is error. status: ' + $?.exitstatus.to_s + ' command: ' + @post_command if $?.exitstatus != 0 end end |