Skip to content

Commit a10f551

Browse files
committed
Fix Issue #255
1 parent 766597b commit a10f551

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

start.ps1

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
4141
$DependencyScript = "install.ps1"
4242
$CurrentDir = $PSScriptRoot
4343

44-
Write-Host "Checking for application dependencies (uv, Npcap)..."
45-
4644
# Check if uv is available. If it's not, we assume the initial setup needs to run.
4745
$NpcapFound = Test-NpcapInstalled
4846
if (-not (Get-Command uv -ErrorAction SilentlyContinue) -or -not $NpcapFound) {
@@ -76,8 +74,6 @@ if (-not (Test-Path "$PSScriptRoot\.venv")) {
7674
Write-Error "Failed to set up virtual environment. $($_.Exception.Message)"
7775
exit 1
7876
}
79-
} else {
80-
Write-Host "Virtual environment already exists. Skipping setup."
8177
}
8278

8379
# --- 4. Find and Launch Application ---
@@ -92,7 +88,7 @@ $streamlitAppPath = "$PSScriptRoot\src\libinspector\dashboard.py"
9288
# The entire argument list is passed to uv.
9389
$StreamlitArgs = @("run", "streamlit", "run", "`"$streamlitAppPath`"")
9490

95-
$streamlitProcess = Start-Process -FilePath "uv" `
91+
Start-Process -FilePath "uv" `
9692
-ArgumentList $StreamlitArgs `
9793
-PassThru `
9894
-NoNewWindow
@@ -104,13 +100,3 @@ Start-Process -FilePath "http://localhost:33721/"
104100

105101
# Wait for the Streamlit process to finish or for the user to close this window
106102
Write-Host "IoT Inspector is running. Close this window to stop the application."
107-
Read-Host "Press Enter to exit"
108-
109-
# Stop the Streamlit process. We rely on the PID returned by Start-Process on 'uv'.
110-
if ($streamlitProcess -and $streamlitProcess.HasExited -eq $False) {
111-
# Streamlit often spawns a child process and exits. We may need to kill the parent PID.
112-
Stop-Process -Id $streamlitProcess.Id -Force -ErrorAction SilentlyContinue
113-
} else {
114-
Write-Warning "Streamlit server process was not found or already exited. Manual cleanup may be required."
115-
}
116-
exit

0 commit comments

Comments
 (0)