[
https://issues.apache.org/jira/browse/BUILDR-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018679#comment-13018679
]
Stephen Haberman commented on BUILDR-581:
-----------------------------------------
>From poking around in vim:
def applies_to?(project, task)
paths = task.sources + [sources].flatten.map { |src|
Array(project.path_to(:source, task.usage, src.t
paths.flatten!
ext_glob = Array(source_ext).join(',')
paths.each { |path|x
Find.find(path) {|found|
if (!File.directory?(found)) &&
found.match(/.*\.#{Array(source_ext).join('|')}/)
return true
end
} if File.exist? path
}
false
end
It looks like File.exist? wants path to be a String--seems like somewhere else
I saw the same sort of File.exist? check against sources but it called to_s on
the path before passing it to File.exist?.
> TypeError in compile.rb:102 can't convert Rake::FileTask into String
> --------------------------------------------------------------------
>
> Key: BUILDR-581
> URL: https://issues.apache.org/jira/browse/BUILDR-581
> Project: Buildr
> Issue Type: Bug
> Components: Core features
> Affects Versions: 1.4.5
> Reporter: Stephen Haberman
> Priority: Minor
>
> In a completely empty directory, with just this buildfile:
> define 'foo' do
> bin = file(_('bin/java'))
> compile.from bin
> end
> The compiler detection will blow (no src/main/java, etc.) when it tries to
> detect against bin, which is a FileTask, as it was expecting only strings.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira