Determine software script name properly

This commit is contained in:
Manuel Thalmann 2024-08-06 12:21:48 +02:00
parent 92d041c327
commit 76a9004e3c

View file

@ -16,11 +16,11 @@ $null = New-Module {
[hashtable] $Arguments
)
if (-not $Name) {
$Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName));
}
Start-Operation {
if (-not $Name) {
$Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName));
}
if ($null -ne $Name) {
$Name = "``$Name``";
} else {