Skip to content

Commit

Permalink
fix .app lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
gweinjc committed Dec 16, 2024
1 parent 189a570 commit 4400a83
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ function Get-JCSystemApp () {
if ($name) {
# Check for .app at the end of the software name
$macOsSoftwareName = $name
if ($macOsSoftwareName -contains '.app') {
if ($macOsSoftwareName -match '.app') {
$ending = $macOsSoftwareName.Substring($macOsSoftwareName.Length - 4)
}
If ($ending -match '.app') {
$macOsSoftwareName = $macOsSoftwareName.Replace($ending, $ending.toLower())
Write-Debug "$macOsSoftwareName"
} else {
Expand Down Expand Up @@ -219,10 +217,8 @@ function Get-JCSystemApp () {

} elseif ($os -eq 'MacOs') {
$macOsSoftwareName = $name
if ($macOsSoftwareName -contains '.app') {
if ($macOsSoftwareName -match '.app') {
$ending = $macOsSoftwareName.Substring($macOsSoftwareName.Length - 4)
}
If ($ending -match '.app') {
$macOsSoftwareName = $macOsSoftwareName.Replace($ending, $ending.toLower())
Write-Debug "$macOsSoftwareName"
} else {
Expand Down

0 comments on commit 4400a83

Please sign in to comment.