From 09078d382bbd66d460f9a5b9d82ab41b98313c28 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 14 Aug 2023 22:44:09 +0100 Subject: [PATCH] make examples and tests runnable if dot sourced --- examples/cli/CLI.ps1 | 2 +- examples/obs/Vm-Obs-Sync.ps1 | 2 +- tests/pre-commit.ps1 | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/cli/CLI.ps1 b/examples/cli/CLI.ps1 index aec0e53..8ff793d 100644 --- a/examples/cli/CLI.ps1 +++ b/examples/cli/CLI.ps1 @@ -63,4 +63,4 @@ function main { finally { Disconnect-Voicemeeter } } -if ($MyInvocation.InvocationName -ne '.') { main } +main diff --git a/examples/obs/Vm-Obs-Sync.ps1 b/examples/obs/Vm-Obs-Sync.ps1 index f8f7840..839045d 100644 --- a/examples/obs/Vm-Obs-Sync.ps1 +++ b/examples/obs/Vm-Obs-Sync.ps1 @@ -68,4 +68,4 @@ function main { } } -if ($MyInvocation.InvocationName -ne '.') { main } +main diff --git a/tests/pre-commit.ps1 b/tests/pre-commit.ps1 index f652f9c..8e14e7e 100644 --- a/tests/pre-commit.ps1 +++ b/tests/pre-commit.ps1 @@ -73,5 +73,4 @@ function main() { } - -if ($MyInvocation.InvocationName -ne '.') { main } \ No newline at end of file +main