lib/command/run.rb in cpl-0.2.0 vs lib/command/run.rb in cpl-0.3.0
- old
+ new
@@ -57,10 +57,10 @@
def clone_workload # rubocop:disable Metrics/MethodLength
progress.puts "- Cloning workload '#{workload}' on '#{config.options[:app]}' to '#{one_off}'"
# Create a base copy of workload props
- 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]