-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Windows Compatibility-Add PowerShell Script as an Alternative to Gr…
…ep on Linux (#690) PR Summary This pull request introduces a PowerShell-based alternative to the grep command, ensuring that the built-in File Searching feature is also compatible with Windows systems. service_client.go: Added runOSSpecificGrepCommand to handle grep functionality for both Windows (using PowerShell) and Unix-based systems. This function checks for the OS platform and invokes powershell(windows) and grep(linux). Replaced direct grep command execution with runOSSpecificGrepCommand to support cross-platform compatibility. service_client.go: Implemented parseGrepOutputForFileContent to parse the output from both PowerShell and grep. This enhancement not only refines the existing parsing mechanism for Linux but also accommodates Windows file path patterns and addresses issues with the split function when multiple ':' appear in the input. WIP: Testing --------- Signed-off-by: kthatipally <[email protected]>
- Loading branch information
1 parent
8c930fc
commit 80d7fb0
Showing
1 changed file
with
77 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters