code: func findInDir(file, dir string, env environ.Env) (string, error) {
  	var exts []string
  	if x, ok := env.Get(`PATHEXT`); ok {
  		for _, e := range strings.Split(strings.ToLower(x), `;`) {
  			if e == "" {
  				continue
  			}
  			if e[0] != '.' {
  				e = "." + e
  			}
  			exts = append(exts, e)
  		}
  	} else {
  		exts = []string{".com", ".exe", ".bat", ".cmd"}
  	}
  
  	if f, err := findExecutable(filepath.Join(dir, file), exts); err == nil {
  		return f, nil
  	}
  	return "", errors.New("not found")
  }
docs: // findInDir is a paraphrased and trimmed version of "exec.LookPath"
  // (for Windows),
  //
  // Copied from:
  // https://github.com/golang/go/blob/d234f9a75413fdae7643e4be9471b4aeccf02478/src/os/exec/lp_windows.go
  //
  // Modified to:
  //	- Use a supplied "dir" instead of scanning through PATH.
  //	- Not consider cases where "file" is an absolute path
  //	- Ignore the possibility that "file" may be in the CWD; only look in "dir".