Skip to content
Merged
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
12 changes: 6 additions & 6 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ for ($i = 0; $i -lt $args.Count; $i++) {
if ($startDir -and (Test-Path $startDir)) {
Set-Location $startDir
} elseif ($startDir) {
Write-Warning "Start directory is not set or does not exist: $startDir"
Write-WarnLog "Start directory is not set or does not exist: $startDir"
}

# Default ports
Expand Down Expand Up @@ -313,7 +313,7 @@ function Ensure-WSL2 {
}
Write-InfoLog "WSL2 set as the default version."
} catch {
Write-Warning "wsl --set-default-version failed. Attempting to detect if 'wsl --update' is supported..."
Write-WarnLog "wsl --set-default-version failed. Attempting to detect if 'wsl --update' is supported..."

# Check if 'wsl --update' exists
$hasWSLUpdate = $false
Expand All @@ -332,7 +332,7 @@ function Ensure-WSL2 {
Write-InfoLog "Running 'wsl --update'..."
$output = & wsl --update 2>&1
if ($LASTEXITCODE -ne 0) {
Write-WarningLog "wsl --update failed with exit code $LASTEXITCODE.`n$output"
Write-WarnLog "wsl --update failed with exit code $LASTEXITCODE.`n$output"
}
Write-InfoLog "WSL updated successfully."
} catch {
Expand All @@ -344,7 +344,7 @@ function Ensure-WSL2 {
Write-InfoLog "'wsl --update' not supported. Attempting 'wsl --install --no-distribution'..."
$output = & wsl --install --no-distribution 2>&1
if ($LASTEXITCODE -ne 0) {
Write-WarningLog "wsl --install failed with exit code $LASTEXITCODE.`n$output"
Write-WarnLog "wsl --install failed with exit code $LASTEXITCODE.`n$output"
}
Write-InfoLog "WSL installed successfully (no distribution)."
} catch {
Expand Down Expand Up @@ -541,7 +541,7 @@ function Set-EnvVariables {

$envContent | Set-Content $envFile
} else {
Write-Warning ".env file not found."
Write-WarnLog ".env file not found."
}
}

Expand Down Expand Up @@ -659,7 +659,7 @@ try {
# Run main function
Start-Installation
} catch {
Write-Error "Script error: $_"
Write-ErrorLog "Script error: $_"
} finally {
if ($PAUSE_AT_END) {
Read-Host "Press Enter to exit..."
Expand Down