lib/travis/tools/system.rb in travis-1.6.3.travis.373.4 vs lib/travis/tools/system.rb in travis-1.6.3.travis.374.4
- old
+ new
@@ -70,8 +70,13 @@
def has?(command)
return false unless unix?
@has ||= {}
@has.fetch(command) { @has[command] = system "which #{command} 2>/dev/null >/dev/null" }
end
+
+ def running?(app)
+ return false unless unix?
+ system "pgrep -u $(whoami) #{app} >/dev/null"
+ end
end
end
end