From 40a422bb8ecb0f87498e7e2b2360fc030f3a7830 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 b72c13b8..1296ecb2 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 {