lib/capistrano/cli/options.rb
# Looks for a default recipe file in the current directory.
Looks for a default recipe file in the current directory.
Looks for a default recipe file in the current directory .
def look_for_default_recipe_file! 
        current = Dir.pwd
        loop do
          %w(Capfile capfile).each do |file|
            if File.file?(file)
              options[:recipes] << file
              @logger.info "Using recipes from #{File.join(current,file)}"
              return
            end
          end
          pwd = Dir.pwd
          Dir.chdir("..")
          break if pwd == Dir.pwd 
        end
        Dir.chdir(current)
      end
def look_for_default_recipe_file! current = Dir . pwd loop do %w( Capfile capfile ) . each do | file | if File . file? ( file ) options [ :recipes ] << file @logger . info "Using recipes from #{File.join(current,file)}" return end end pwd = Dir . pwd Dir . chdir ( ".." ) break if pwd == Dir . pwd end Dir . chdir ( current ) end
Looks for a default recipe file in the current directory.
Looks for a default recipe file in the current directory .
#:nodoc: # if changing the directory made no difference, then we're at the top