+ // When not set (or set to '.') set bin to path of xds-agent executable
+ bdir := s.binDir
+ if bdir == "" || bdir == "." {
+ if dir, err := filepath.Abs(filepath.Dir(os.Args[0])); err == nil {
+ bdir = dir
+ }
+ }
+
+ path, err := exec.LookPath(path.Join(bdir, exeName))