Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 rubocop 与 Rake 集成?
我想将上述 shell 命令的输出通过管道传输到 ("sh rubocop") 到一个文本文件,但它似乎不起作用。
耙文件
require 'rake' task :shell_me do sh './blah' end
等等chmod +x blah(通过+ shebang可执行)
chmod +x blah
#!/usr/bin/ruby puts "HI!"
外壳命令: $ rake shell_me > blah.log
$ rake shell_me > blah.log
废话日志:
HI!