From da5ff42988634f33359b21704dab3b0003c93bb7 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 6 Aug 2024 12:21:48 +0200 Subject: [PATCH] Determine software script name properly --- scripts/Windows/Scripts/Software.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Windows/Scripts/Software.ps1 b/scripts/Windows/Scripts/Software.ps1 index b72c13b8c..1296ecb21 100644 --- a/scripts/Windows/Scripts/Software.ps1 +++ b/scripts/Windows/Scripts/Software.ps1 @@ -16,11 +16,11 @@ $null = New-Module { [hashtable] $Arguments ) - Start-Operation { - if (-not $Name) { - $Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName)); - } + if (-not $Name) { + $Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName)); + } + Start-Operation { if ($null -ne $Name) { $Name = "``$Name``"; } else {