lib/percheron/actions/stop.rb in percheron-0.6.3 vs lib/percheron/actions/stop.rb in percheron-0.6.4
- old
+ new
@@ -7,11 +7,12 @@
def initialize(container)
@container = container
end
def execute!
- stop! if container.running?
- container
+ results = []
+ results << stop! if container.running?
+ results.compact.empty? ? nil : container
end
private
attr_reader :container