From eed477846fe79a9b281265d884b396d3913c4a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 29 Dec 2023 02:44:10 +0100 Subject: [PATCH 1/2] fix Get-YouTubeChannel -raw --- functions/Get-YouTubeChannel.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/Get-YouTubeChannel.ps1 b/functions/Get-YouTubeChannel.ps1 index 39108f5..204187f 100644 --- a/functions/Get-YouTubeChannel.ps1 +++ b/functions/Get-YouTubeChannel.ps1 @@ -21,8 +21,9 @@ function Get-YouTubeChannel { } Write-Verbose -Message $Uri $Result = Invoke-RestMethod -Uri $Uri -Method Get -Headers (Get-AccessToken) - $Result.items | ForEach-Object -Process { $PSItem.PSTypeNames.Add('YouTube.Channel') } - if ($Raw) { return $Result } - $Result.items -} + if ($PSBoundParameters.ContainsKey('Raw')) { return $Result } + + $Result.items | ForEach-Object -Process { $PSItem.PSTypeNames.Add('YouTube.Channel') } + return $Result.Items +} \ No newline at end of file From 40cdc0ac3349d548e27d77ccaf1e06ee40f08895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 29 Dec 2023 02:57:17 +0100 Subject: [PATCH 2/2] find edge browser on win10 --- functions/private/Find-Browser.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/private/Find-Browser.ps1 b/functions/private/Find-Browser.ps1 index cfe172f..57f31ef 100644 --- a/functions/private/Find-Browser.ps1 +++ b/functions/private/Find-Browser.ps1 @@ -25,10 +25,11 @@ function Find-Browser { 'chrome' 'firefox' 'MicrosoftEdge.exe' - 'chromium' + 'chromium', + 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe' ) foreach ($Command in $CommandList) { - if (Get-Command -Name $Command -ErrorAction Ignore) { return $Command } + if ($BrowserCommand = Get-Command -Name $Command -ErrorAction Ignore) { return $BrowserCommand.source } } throw 'No web browser could be found to use for oAuth' }