Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts/windows/build_and_run.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@echo off
echo Starting Langflow build and run process...

REM Check if .env file exists and set env file parameter
set "ENV_FILE_PARAM="
REM Check if .env file exists and set env file flag
set "USE_ENV_FILE="
REM Get the script directory and resolve project root
for %%I in ("%~dp0..\..") do set "PROJECT_ROOT=%%~fI"
set "ENV_PATH=%PROJECT_ROOT%\.env"
if exist "%ENV_PATH%" (
echo Found .env file at: %ENV_PATH%
set "ENV_FILE_PARAM=--env-file \"%ENV_PATH%\""
set "USE_ENV_FILE=1"
) else (
echo .env file not found at: %ENV_PATH%
echo Langflow will use default configuration
Expand Down Expand Up @@ -85,8 +85,8 @@ echo Step 4: Running Langflow...
echo.
echo Attention: Wait until uvicorn is running before opening the browser
echo.
if defined ENV_FILE_PARAM (
uv run langflow run %ENV_FILE_PARAM%
if defined USE_ENV_FILE (
uv run --env-file "%ENV_PATH%" langflow run
) else (
uv run langflow run
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows/build_and_run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Write-Host "`nStep 4: Running Langflow..." -ForegroundColor Yellow
Write-Host "`nAttention: Wait until uvicorn is running before opening the browser" -ForegroundColor Red
try {
if ($useEnvFile) {
& uv run langflow run --env-file $envPath
& uv run --env-file $envPath langflow run
} else {
& uv run langflow run
}
Expand Down