Skip to content

Commit ffce845

Browse files
committed
re: Fix argument name
1 parent 3c80d64 commit ffce845

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Main.ps1

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
param(
33
[string]$SourceDir = "src",
44
[string]$TestFramework = "none", # Default to "none" if not specified
5-
[string]$OfficeAppName = "automatic" # Default to "automatic" if not specified
5+
[string]$OfficeAppDetection = "automatic" # Default to "automatic" if not specified
66
)
77

88
Write-Host "Current directory: $(pwd)"
@@ -36,7 +36,7 @@ function Get-OfficeApp {
3636
}
3737
}
3838

39-
if ($OfficeAppName -ieq "automatic") {
39+
if ($OfficeAppDetection -ieq "automatic") {
4040

4141
Write-Host "Automatic detection of Office applications based on file extensions"
4242

@@ -57,7 +57,7 @@ if ($OfficeAppName -ieq "automatic") {
5757

5858
} else {
5959
# We parse the OfficeApp parameter to get the name of the Office application
60-
$officeApps = $OfficeAppName -split ","
60+
$officeApps = $OfficeAppDetection -split ","
6161
$officeApps = $officeApps | ForEach-Object { $_.Trim() }
6262
$officeApps = $officeApps | Where-Object { $_ -in @("Excel", "Word", "PowerPoint", "Access") }
6363
if ($officeApps.Count -eq 0) {
@@ -107,11 +107,7 @@ foreach ($folder in $folders) {
107107

108108
$fileExtension = $folder.Substring($folder.LastIndexOf('.') + 1)
109109

110-
Write-Host "File extension: $fileExtension"
111-
Write-Host "Office app detection : $OfficeAppName"
112-
Write-Host "Office apps: $officeApps"
113-
114-
if ($OfficeAppName -ieq "automatic") {
110+
if ($OfficeAppDetection -ieq "automatic") {
115111
$app = Get-OfficeApp -FileExtension $fileExtension
116112
} elseif ($officeApps.Count -eq 1) {
117113
$app = $officeApps[0]

0 commit comments

Comments
 (0)