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
7 changes: 4 additions & 3 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ function Get-Dependencies {
Write-Host " $Description"
}

$Stopwatch = [Diagnostics.Stopwatch]::StartNew()
Write-Host "[$([DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss"))] Get-Dependencies ..." -ForegroundColor Cyan
$ProgressPreference = "SilentlyContinue"

Expand All @@ -1141,7 +1142,7 @@ function Get-Dependencies {
return
}

Write-Output "$Destination not found. Downloading ..."
# Write-Output "$Destination not found. Downloading ..."
if ($ToBatch) {
Write-Output "md `"$(Split-Path -Path $Destination -Parent)`""
Write-Output "curl.exe -sL $URL -o $Destination"
Expand Down Expand Up @@ -1174,7 +1175,7 @@ function Get-Dependencies {
$ExtractedLastWriteTime = (Get-Item $Destination).LastWriteTime
# Compare the last write times
if ($ZipLastWriteTime -le $ExtractedLastWriteTime) {
Write-Output "'$ZipFileName' is already extracted and up to date."
# Write-Output "'$ZipFileName' is already extracted and up to date."
return
}
}
Expand Down Expand Up @@ -1279,7 +1280,7 @@ function Get-Dependencies {

function Test-PythonModuleInstalled([string] $ModuleName) {
try {
Invoke-Program -Silent "$(Get-PythonExecutable)" -c "import $ModuleName"
Invoke-Program -Silent "$(Get-PythonExecutable)" -c "import importlib.util, sys; sys.exit(0 if importlib.util.find_spec('$ModuleName') else 1)"
return $true
} catch {
return $false
Expand Down