Skip to content

Commit c8608a0

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

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

scripts/Build-VBA.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ if (-not $rubberduckTestResult) {
354354

355355
# Close the document
356356
try {
357-
$doc.Close()
357+
$doc.Close($false) # Close without saving changes
358358
Write-Host "Document closed successfully"
359359
} catch {
360360
Write-Host "Warning: Could not close document: $($_.Exception.Message)"

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)