Sha256: d92c9dcf76555c18bb7fa450c49f820e06253cf58c46b8be8f39cdeed3c29586
Contents?: true
Size: 938 Bytes
Versions: 23
Compression:
Stored size: 938 Bytes
Contents
module Bake module Blocks module HasExecuteCommand def executeCommand(commandLine, ignoreStr=nil, exitCodeArray = [0]) puts commandLine if Bake.options.verbose >= 1 puts "(executed in '#{@projectDir}')" if Bake.options.verbose >= 3 cmd_result = false output = "" begin Dir.chdir(@projectDir) do cmd_result, output = ProcessHelper.run([commandLine], true, true, nil, exitCodeArray) end rescue Exception=>e puts e.message puts e.backtrace if Bake.options.debug end if (cmd_result == false and (not ignoreStr or not output.include?ignoreStr)) Bake.formatter.printError("Command \"#{commandLine}\" failed", @config) puts "(executed in '#{@projectDir}')" if Bake.options.verbose >= 3 raise SystemCommandFailed.new end return cmd_result end end end end
Version data entries
23 entries across 23 versions & 1 rubygems
Version | Path |
---|---|
bake-toolkit-2.23.1 | lib/blocks/has_execute_command.rb |
bake-toolkit-2.22.0 | lib/blocks/has_execute_command.rb |
bake-toolkit-2.21.0 | lib/blocks/has_execute_command.rb |