package e2e import ( "fmt" "os" ) // GetBinaryPath resolves the path to the wg-wrap binary. // It prioritizes the WG_WRAP_BIN environment variable. func GetBinaryPath() (string, error) { path := os.Getenv("WG_WRAP_BIN") if path == "" { return "", fmt.Errorf("WG_WRAP_BIN environment variable not set") } if _, err := os.Stat(path); err != nil { return "", fmt.Errorf("binary not found at path %s: %w", path, err) } return path, nil }