code: func (d *Downloader) CmdAndCwd() ([]string, string, error) {
  	d.mu.Lock()
  	finished := d.finished
  	d.mu.Unlock()
  	if !finished {
  		return nil, "", errors.New(
  			"can only call CumulativeIsolated on a finished Downloader")
  	}
  
  	if d.err != nil {
  		return nil, "", d.err
  	}
  
  	queue := []*isolated.Isolated{d.isoMap[d.rootHash]}
  
  	for len(queue) > 0 {
  		iso := queue[0]
  
  		if len(iso.Command) > 0 {
  			return iso.Command, iso.RelativeCwd, nil
  		}
  
  		toPrepend := []*isolated.Isolated{}
  		for _, inc := range iso.Includes {
  			toPrepend = append(toPrepend, d.isoMap[inc])
  		}
  		queue = append(toPrepend, queue[1:]...)
  	}
  
  	return nil, "", nil
  }
docs: // CmdAndCwd returns the effective command and relative_cwd entries
  // from the fetched isolated.
  //
  // Must be called after the Downloader is completed.
  //
  // Note that new uses of isolated should NOT use cmd or relative_cwd!