Skip to content

Commit bd03f32

Browse files
committed
Fix paths and calls
1 parent ed0f517 commit bd03f32

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

scripts/Install-Rubberduck-VBA.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ if (-not $rubberduckInstallPath) {
233233
Write-Host "⏳ Downloading and installing CLI-Friendly DLL components..."
234234

235235
# Define the artifact URL and download location
236-
$artifactUrl = "https://github.com/DecimalTurn/Rubberduck/actions/runs/14609505761/artifacts/2990874874"
236+
$artifactUrl = "https://github.com/DecimalTurn/Rubberduck/releases/download/v2.5.92.6373-CLI-Friendly/rubberduck-v2.5.92.6373-CLI-Friendly.zip"
237237
$artifactZipPath = "$env:TEMP\RubberduckArtifacts.zip"
238238
$rubberduckInstallDir = $rubberduckInstallPath # Use the path returned by Test-RubberduckInstalled
239239

scripts/Tests-Rubberduck-VBA.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Test-WithRubberduck {
88
$rubberduckAddin = $null
99
$rubberduck = $null
1010
try {
11-
$rubberduckAddin = $officeApp.VBE.COMAddIns.Item("Rubberduck.Extension")
11+
$rubberduckAddin = $officeApp.VBE.AddIns("Rubberduck.Extension")
1212
if ($null -eq $rubberduckAddin) {
1313
Write-Host "🔴 Error: Rubberduck add-in not found. Please install it first."
1414
return $false
@@ -24,7 +24,7 @@ function Test-WithRubberduck {
2424

2525
# Run all tests in the active VBA project
2626
$logPath = "$env:temp\RubberduckTestLog.txt"
27-
$rubberduck.RunAllTests($logPath)
27+
$rubberduck.RunAllTestsAndGetResults($logPath)
2828
Write-Host "All tests executed successfully."
2929

3030
# Wait for tests to complete (optional: add a timeout)
@@ -46,6 +46,10 @@ function Test-WithRubberduck {
4646
Write-Host "🔴 Error: Log file not found. Please check the installation."
4747
return $false
4848
}
49+
50+
# Delete the log file after processing
51+
Remove-Item -Path $logPath -ErrorAction SilentlyContinue
52+
Write-Host "Log file deleted."
4953

5054
# Make sure to release the COM object
5155
if ($null -ne $rubberduck) {

0 commit comments

Comments
 (0)