rake icon indicating copy to clipboard operation
rake copied to clipboard

Rake runs everything that is named like a file/folder

Open grosser opened this issue 9 years ago • 6 comments

rake foo
Don't know how to build task foo

rake Gemfile
... no output ... and does not fail

especially annoying with things like rake test doing nothing -> CI being green and nobody noticing ...

grosser avatar Apr 17 '16 15:04 grosser

@grosser I understood your issue. Should we ignore only folder without file?

hsbt avatar Apr 20 '16 09:04 hsbt

ignore all arguments that are not tasks ideally ... not sure what this file as argument bug/feature is used for ..

grosser avatar Apr 20 '16 14:04 grosser

Whenever a requested task (name) is satisfied by no defined task, but only satisfied by a file (or directory) name, Rake could print an announcement (even without --verbose).

That UI feature change might clarify this behavior (which arguably is somewhat mysterious to some users). Would it provide sufficient information for the CI case?

For those whose Rakefiles contain file tasks, would the noise of such announcements be too problematic?

MarkDBlackwell avatar Jul 24 '16 16:07 MarkDBlackwell

ignore all arguments that are not tasks ideally ... not sure what this file as argument bug/feature is used for ..

For an excellent introduction to this, see Avdi Grimm's Part 1: Files and Rules from his Rake series, mentioned here in the README.

MarkDBlackwell avatar Jul 27 '16 13:07 MarkDBlackwell

Could not find anything helpful at this link. I don't see any usecase for rake test doing nothing when there is no test task defined. Do you ?

grosser avatar Jul 27 '16 15:07 grosser

I created #234 which appears to be a dupe of this. #234 diagnoses the problem, so maybe this discussion should move over there?

rickhull avatar Nov 06 '17 20:11 rickhull