lib/inside_docker.rb in inside_docker-0.1.1 vs lib/inside_docker.rb in inside_docker-0.1.2
- old
+ new
@@ -3,7 +3,9 @@
class Object
def inside_docker?
File.readlines("/proc/1/sched").each do |line|
return line.strip != "systemd (1, #threads: 1)"
end
+ rescue Errno::ENOENT => e
+ false
end
end