lib/command/run_detached.rb in cpl-0.2.0 vs lib/command/run_detached.rb in cpl-0.3.0
- old
+ new
@@ -55,10 +55,10 @@
def clone_workload # rubocop:disable Metrics/MethodLength
progress.puts "- Cloning workload '#{workload}' on '#{config.options[:app]}' to '#{one_off}'"
# Get base specs of workload
- spec = cp.workload_get(workload).fetch("spec")
+ spec = cp.workload_get_and_ensure(workload).fetch("spec")
container = spec["containers"].detect { _1["name"] == workload } || spec["containers"].first
# remove other containers if any
spec["containers"] = [container]