install.ps1: Force cast on lists

Fixes script creating a folder called C in the current directory when only one firefoxProfileDirPaths exists
This commit is contained in:
Henry Morley 2026-01-25 20:13:21 +00:00 committed by GitHub
parent 1f30fe71dd
commit 0858a3d0e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -401,11 +401,11 @@ function Check-ProfileDir() {
)
if ( "${profileDir}" -ne "" ) {
$global:firefoxProfileDirPaths = @("${profileDir}")
[System.Collections.Generic.List[string]]$global:firefoxProfileDirPaths = @("${profileDir}")
}
$global:firefoxProfileDirPaths = Filter-Path $global:firefoxProfileDirPaths "Container"
[System.Collections.Generic.List[string]]$global:firefoxProfileDirPaths = Filter-Path $global:firefoxProfileDirPaths "Container"
if ( $firefoxProfileDirPaths.Length -eq 0 ) {
Lepton-ErrorMessage "Unable to find firefox profile dir."
@ -653,7 +653,7 @@ $localCustomFiles = $customFiles.Clone()
$customFileExist = $false
function Check-CustomFiles() {
$global:localCustomFiles = Filter-Path $localCustomFiles
[System.Collections.Generic.List[string]]$global:localCustomFiles = Filter-Path $localCustomFiles
if ( $global:localCustomFiles.Length -gt 0 ) {
$global:customFileExist = $true