refactor(brush-core-vendored): fixed PATHEXT handling for Windows executable discovery
- Refactored ExecutablePathSearch to remove generic type parameter N and use pre-computed filename candidates instead of single filename. - Extracted platform-specific candidate_filenames() functions to generate executable filename variants on Windows and Unix-like systems. - Replaced manual PATH string splitting with std::env::split_paths() for cross-platform path parsing. - Simplified find_in_path() method to delegate to pathsearch::search_for_executable() instead of custom path searching logic. - Implemented executable_extensions() function with lazy initialization to parse PATHEXT environment variable on Windows. - Enhanced executable() method to validate file extensions against known executable extensions instead of returning hardcoded true.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "bun:test";
|
||||
import { PythonKernel } from "@oh-my-pi/pi-coding-agent/ipy/kernel";
|
||||
import * as gatewayCoordinator from "@oh-my-pi/pi-coding-agent/ipy/gateway-coordinator";
|
||||
import { PythonKernel } from "@oh-my-pi/pi-coding-agent/ipy/kernel";
|
||||
import { TempDir } from "@oh-my-pi/pi-utils";
|
||||
import type { Subprocess } from "bun";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user