Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Behavior of -a, --autoformat is different on different platforms when working directory is set as an argument #194

Closed
flashquartermaster opened this Issue · 5 comments

5 participants

Tom Coxen David Kowis Oleg Sukhodolsky Matt Wynne Chris Parsons
Tom Coxen

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 `<top (required)>'
C:/Ruby192/bin/cucumber:19:in `load'
C:/Ruby192/bin/cucumber:19:in `<main>'

On OSX and Ubuntu (requires su, sudo or permission denied)

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

David Kowis
Collaborator

from https://github.com/cucumber/cucumber/blob/master/lib/cucumber/cli/configuration.rb#L171 the TODO: is that we should remove the autoformat functionality. So, if I were to make a pull request for this, it'd be to remove it for cucumber 2.0.0. Objections?

David Kowis dkowis was assigned
Oleg Sukhodolsky
Collaborator

No objections, do it.

Oleg Sukhodolsky
Collaborator

BTW I've re-targeted the issue to 2.0

Matt Wynne
Owner

That TODO comment is nice in theory, but I don't think Gherkin's CLI is very well documented at the moment, and I'd be curious to see whether it will solve @flashquartermaster's problem here and run OK on Windows.

I'd be happy to remove this feature from Cucumber, but we should check whether the Gherkin CLI will work as a replacement before we do.

Chris Parsons chrismdp modified the milestone: 2.0
Matt Wynne
Owner

-a is gone.

Matt Wynne mattwynne closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.