2
2
param (
3
3
[string ]$SourceDir = " src" ,
4
4
[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
6
6
)
7
7
8
8
Write-Host " Current directory: $ ( pwd) "
@@ -36,7 +36,7 @@ function Get-OfficeApp {
36
36
}
37
37
}
38
38
39
- if ($OfficeAppName -ieq " automatic" ) {
39
+ if ($OfficeAppDetection -ieq " automatic" ) {
40
40
41
41
Write-Host " Automatic detection of Office applications based on file extensions"
42
42
@@ -57,7 +57,7 @@ if ($OfficeAppName -ieq "automatic") {
57
57
58
58
} else {
59
59
# We parse the OfficeApp parameter to get the name of the Office application
60
- $officeApps = $OfficeAppName -split " ,"
60
+ $officeApps = $OfficeAppDetection -split " ,"
61
61
$officeApps = $officeApps | ForEach-Object { $_.Trim () }
62
62
$officeApps = $officeApps | Where-Object { $_ -in @ (" Excel" , " Word" , " PowerPoint" , " Access" ) }
63
63
if ($officeApps.Count -eq 0 ) {
@@ -107,11 +107,7 @@ foreach ($folder in $folders) {
107
107
108
108
$fileExtension = $folder.Substring ($folder.LastIndexOf (' .' ) + 1 )
109
109
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" ) {
115
111
$app = Get-OfficeApp - FileExtension $fileExtension
116
112
} elseif ($officeApps.Count -eq 1 ) {
117
113
$app = $officeApps [0 ]
0 commit comments