run_in_cell

in lib/cell_manager.rb [79:100]


  def run_in_cell(cell_id, args, quiet: false, skip_directory_check: false)
    return Result.new(false) unless enabled?

    cell, _index = find_cell(cell_id)
    unless cell
      GDK::Output.error("Cell #{cell_id} not found. #{help_cell_list}")
      return Result.new(false)
    end

    dir = directory_for_cell(cell)
    unless skip_directory_check || Dir.exist?(dir)
      GDK::Output.error("Cell #{cell[:id]} doesn’t exist yet, run `gdk cells up` first.")
      return Result.new(false)
    end

    opts = { chdir: dir }
    sh = GDK::Shellout.new("gdk #{args.join ' '};", **opts)
    sh.execute(display_output: !quiet)

    sh
  end