lib/butler/cli_app.rb
def with_working_dir(cmd, &block)
      ccmd = []
      if @working_dir != nil and not @working_dir.empty?
        ccmd << "cd #{@working_dir}"
      end
      ccmd << cmd

      if block
        block.call(ccmd.join(" && "))
      end 
    end
# 
# construct final command prefix with working dir
# 
construct final command prefix with working dir
construct final command prefix with working dir
def with_working_dir(cmd, &block)
      ccmd = []
      if @working_dir != nil and not @working_dir.empty?
        ccmd << "cd #{@working_dir}"
      end
      ccmd << cmd
      if block
        block.call(ccmd.join(" && "))
      end 
    end
def with_working_dir ( cmd , & block ) ccmd = [ ] if @working_dir != nil and not @working_dir . empty? ccmd << "cd #{@working_dir}" end ccmd << cmd if block block . call ( ccmd . join ( " && " ) ) end end
construct final command prefix with working dir
construct final command prefix with working dir
cmd
block