code: func FindBinPath(p *stage1commontypes.Pod, ra *schema.RuntimeApp) (string, error) {
  	if len(ra.App.Exec) == 0 {
  		return "", errors.New("app has no executable")
  	}
  
  	bin := ra.App.Exec[0]
  
  	var binPath string
  	switch {
  	// absolute path, just use it
  	case filepath.IsAbs(bin):
  		binPath = bin
  	// non-absolute path containing a slash, look in the working dir
  	case strings.Contains(bin, "/"):
  		binPath = filepath.Join(ra.App.WorkingDirectory, bin)
  	// filename, search in the app's $PATH
  	default:
  		absRoot, err := filepath.Abs(p.Root)
  		if err != nil {
  			return "", errwrap.Wrap(errors.New("could not get pod's root absolute path"), err)
  		}
  		appRootfs := common.AppRootfsPath(absRoot, ra.Name)
  		appPathDirs := appSearchPaths(p, ra.App.WorkingDirectory, *ra.App)
  		appPath := strings.Join(appPathDirs, ":")
  
  		binPath, err = lookupPathInsideApp(bin, appPath, appRootfs, ra.App.WorkingDirectory)
  		if err != nil {
  			return "", errwrap.Wrap(fmt.Errorf("error looking up %q", bin), err)
  		}
  	}
  
  	return binPath, nil
  }
docs: // FindBinPath takes a binary path and returns a the absolute path of the
  // binary relative to the app rootfs. This can be passed to ExecStart on the
  // app's systemd service file directly.