-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PowerShell 7.4.0 compatibility. Version 1.16.0.
- Loading branch information
1 parent
1361dc9
commit b709978
Showing
8 changed files
with
53 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
Private/Invoke-HaloPreFlightChecks.ps1 → Private/Invoke-HaloPreFlightCheck.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
using namespace System.Management.Automation | ||
|
||
function Invoke-HaloPreFlightCheck { | ||
if ($null -eq $Script:HAPIConnectionInformation) { | ||
$NoConnectionInformationException = [System.Exception]::New("Missing Halo connection information, please run 'Connect-HaloAPI' first.") | ||
$ErrorRecord = [ErrorRecord]::New($NoConnectionInformationException, 'NoConnectionInformation', 'AuthenticationError', 'HaloPreFlightCheck') | ||
|
||
$PSCmdlet.ThrowTerminatingError($ErrorRecord) | ||
} | ||
if (($null -eq $Script:HAPIAuthToken) -and ($null -eq $AllowAnonymous)) { | ||
$NoAuthTokenException = [System.Exception]::New("Missing Halo authentication token, please run 'Connect-HaloAPI' first.") | ||
$ErrorRecord = [ErrorRecord]::New($NoAuthTokenException, 'NoAuthToken', 'AuthenticationError', 'HaloPreFlightCheck') | ||
|
||
$PSCmdlet.ThrowTerminatingError($ErrorRecord) | ||
} | ||
using namespace System.Management.Automation | ||
|
||
function Invoke-HaloPreFlightCheck { | ||
if ($null -eq $Script:HAPIConnectionInformation) { | ||
$NoConnectionInformationException = [System.Exception]::New("Missing Halo connection information, please run 'Connect-HaloAPI' first.") | ||
$ErrorRecord = [ErrorRecord]::New($NoConnectionInformationException, 'NoConnectionInformation', 'AuthenticationError', 'HaloPreFlightCheck') | ||
|
||
$PSCmdlet.ThrowTerminatingError($ErrorRecord) | ||
} | ||
if (($null -eq $Script:HAPIAuthToken) -and ($null -eq $AllowAnonymous)) { | ||
$NoAuthTokenException = [System.Exception]::New("Missing Halo authentication token, please run 'Connect-HaloAPI' first.") | ||
$ErrorRecord = [ErrorRecord]::New($NoAuthTokenException, 'NoAuthToken', 'AuthenticationError', 'HaloPreFlightCheck') | ||
|
||
$PSCmdlet.ThrowTerminatingError($ErrorRecord) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.