Determine software script name properly

This commit is contained in:
Manuel Thalmann 2024-08-06 12:21:48 +02:00
parent 48f0097c45
commit 40a422bb8e

View file

@ -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));
}
Start-Operation {
if ($null -ne $Name) {
$Name = "``$Name``";
} else {