Method: Bake::Blocks::BlockBase.writeCmdLineFile

Defined in:
lib/blocks/blockBase.rb

.writeCmdLineFile(cmd, cmdLineFile) ⇒ Object



77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/blocks/blockBase.rb', line 77

def self.writeCmdLineFile(cmd, cmdLineFile)
  begin
    if !Bake.options.dry
      File.open(cmdLineFile, 'w') { |f| f.write(cmd.join(" ")) }
    end
  rescue Exception => e
    if Bake.options.debug
      puts e.message
      puts e.backtrace
    end
  end
end