lib/travis/cli/init.rb in travis-1.5.2 vs lib/travis/cli/init.rb in travis-1.5.3

- old
+ new

@@ -1,10 +1,12 @@ require 'travis/cli' module Travis module CLI class Init < Enable + description "generates a .travis.yml and enables the project" + on('-f', '--force', 'override .travis.yml if it already exists') on('-k', '--skip-enable', 'do not enable project, only add .travis.yml') on('-p', '--print-conf', 'print generated config instead of writing to file') options = %w[ @@ -21,10 +23,10 @@ end attr_writer :travis_config def run(language = nil, file = '.travis.yml') - error ".travis.yml already exists, use --force to override" if File.exist?(file) and not force? and not print_conf? + error "#{file} already exists, use --force to override" if File.exist?(file) and not force? and not print_conf? language ||= ask('Main programming language used: ') { |q| q.default = detect_language } self.travis_config = template(language).merge(custom_config) if print_conf? puts travis_config.to_yaml \ No newline at end of file