From b19fdb24ac6000a363d06e7bfd324d316e4b4921 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 1 Apr 2016 22:01:37 -0700 Subject: [PATCH] Throw in Get-PSOutput --- PowerShellGitHubDev.psm1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index ee374b426a..84b8aaee14 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -198,7 +198,12 @@ function Start-PSBuild { function Get-PSOutput { - $script:Output + [CmdletBinding()]param() + if (-Not $Output) { + throw '$script:Output is not defined, run Start-PSBuild' + } + + $Output } @@ -207,10 +212,8 @@ function Start-PSxUnit { if ($IsWindows) { throw "xUnit tests are only currently supported on Linux / OS X" } - if (-Not $script:Output) { - throw '$script:Output is not defined, run Start-PSBuild' - } - $Content = Split-Path -Parent $script:Output + + $Content = Split-Path -Parent (Get-PSOutput) $Arguments = "--configuration", "Linux" try { Push-Location $PSScriptRoot/test/csharp