We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e59d6c7 commit 56d093eCopy full SHA for 56d093e
rake-tasks/buck.rb
@@ -145,7 +145,16 @@ def buck(*args, &block)
145
short = task.name[0..-5]
146
147
task.enhance do
148
- Buck::buck_cmd.call('test', short)
+ # Figure out if this is an executable or a test target.
149
+ Buck::buck_cmd.call('query', "#{short} --output-attributes buck.type") do |output|
150
+ hash = JSON.parse(output)
151
+ type = hash[short]['buck.type']
152
+ if type =~ /.*_test/
153
+ Buck::buck_cmd.call('test', short)
154
+ else
155
+ Buck::buck_cmd.call('run', "--verbose 5 #{short}")
156
+ end
157
158
end
159
160
0 commit comments