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
4 changes: 2 additions & 2 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function Expand-UloopArchive {
[System.IO.Compression.ZipFile]::ExtractToDirectory($ArchivePath, $DestinationPath)
}

$TempDir = Join-Path ([System.IO.Path]::GetTempPath()) ("uloop-install-" + [System.Guid]::NewGuid().ToString("N"))
$TempDir = Join-Path ([System.IO.Path]::GetTempPath()) ("uloop-stage-" + [System.Guid]::NewGuid().ToString("N"))
$StagedUloopPath = $null
$LegacyUloopBeforeInstallCommand = Get-Command uloop -ErrorAction SilentlyContinue | Select-Object -First 1
New-Item -ItemType Directory -Path $TempDir | Out-Null
Expand All @@ -265,7 +265,7 @@ try {
Expand-UloopArchive -ArchivePath $ArchivePath -DestinationPath $TempDir

New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
$StagedUloopPath = Join-Path $InstallDir ("uloop-install-" + [System.Guid]::NewGuid().ToString("N") + ".exe")
$StagedUloopPath = Join-Path $InstallDir ("uloop-staged-" + [System.Guid]::NewGuid().ToString("N") + ".exe")
Copy-Item -Path (Join-Path $TempDir "uloop.exe") -Destination $StagedUloopPath -Force
Assert-UloopVersionSucceeds -UloopPath $StagedUloopPath -Quiet
$FinalUloopPath = Join-Path $InstallDir "uloop.exe"
Expand Down
6 changes: 6 additions & 0 deletions scripts/test-install-release-filter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,11 @@ test_powershell_installer_avoids_optional_archive_cmdlets() {
assert_not_contains "$ROOT_DIR/scripts/install.ps1" "Expand-Archive"
}

test_powershell_installer_uses_non_installer_staged_executable_name() {
assert_contains "$ROOT_DIR/scripts/install.ps1" '"uloop-staged-"'
assert_not_contains "$ROOT_DIR/scripts/install.ps1" '"uloop-install-"'
}

test_posix_latest_skips_prerelease_assets
test_posix_latest_beta_selects_prerelease_assets
test_posix_skips_default_npm_cleanup_when_native_command_is_first
Expand All @@ -608,3 +613,4 @@ test_posix_removes_npm_package_before_replacing_same_bin_path
test_powershell_latest_skips_prerelease_assets
test_git_bash_latest_installs_windows_zip_asset
test_powershell_installer_avoids_optional_archive_cmdlets
test_powershell_installer_uses_non_installer_staged_executable_name
Loading