25 lines
831 B
PowerShell
25 lines
831 B
PowerShell
$Env:RUST_LOG = "info,lanspread_client=debug,lanspread_proto=debug"
|
|
|
|
# Start the process with redirected standard input
|
|
$processInfo = New-Object System.Diagnostics.ProcessStartInfo
|
|
$processInfo.FileName = "cargo"
|
|
$processInfo.Arguments = "run -p lanspread-client -- $args"
|
|
$processInfo.UseShellExecute = $false
|
|
$processInfo.RedirectStandardInput = $true
|
|
|
|
$process = New-Object System.Diagnostics.Process
|
|
$process.StartInfo = $processInfo
|
|
$process.Start() | Out-Null
|
|
|
|
# Continuously write commands to the standard input of the process
|
|
while (!$process.HasExited) {
|
|
Start-Sleep -Milliseconds 100
|
|
$process.StandardInput.WriteLine("list")
|
|
Start-Sleep -Milliseconds 100
|
|
$process.StandardInput.WriteLine("get 1")
|
|
Start-Sleep -Milliseconds 100
|
|
$process.StandardInput.WriteLine("get 25")
|
|
}
|
|
|
|
$process.WaitForExit()
|