cucumber/cucumber — Issue #194: Behavior of -a, --autoformat is different on different platforms when working directory is set as an argument
Author: flashquartermaster
Created: 2011-12-02 16:14:51+00:00
State: open

Running from system root examples:

On Windows:

C:\> cucumber -a newFeaturesDir C:\path\to\features\parent

Invalid argument - newFeaturesDir/C: (Errno::EINVAL)
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:201:in `each'
C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/formatter/pretty.rb:41:in `before_feature'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:173:in `block in send_to_all'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:171:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:171:in `send_to_all'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:162:in `broadcast'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:19:in `visit_feature'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/features.rb:29:in `block in accept'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/features.rb:17:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/features.rb:17:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/features.rb:28:in `accept'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:14:in `block in visit_features'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/ast/tree_walker.rb:13:in `visit_features'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime.rb:45:in `run!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:43:in `execute!'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:20:in `execute'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/bin/cucumber:14:in `'
C:/Ruby192/bin/cucumber:19:in `load'
C:/Ruby192/bin/cucumber:19:in `

'

On OSX and Ubuntu (requires su, sudo or p[ermission denied)

$ cucumber -a newFeaturesDir /path/to/features/parent
Creates
/newFeaturesDir/path/to/features/parent/features/some.feature