Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-WinGetManifest -SubscriptionName parameter does not work #177

Open
ghost opened this issue Oct 4, 2022 · 2 comments
Open

Add-WinGetManifest -SubscriptionName parameter does not work #177

ghost opened this issue Oct 4, 2022 · 2 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 4, 2022

I do not use a default Azure subscription, so I need to use -SubscriptionName with Add-WinGetManifest. It appears this parameter is ignored in the implementation and as such the underlying cmdlets continue to try to use the default subscription which subsequently fails.

Using Connect-AzAccount and Set-AzContext prior to execution does not change the outcome of this.

PS D:\b\winget-cli-restsource\bin> add-wingetmanifest -FunctionName "XXX" -Path "D:\b\winget-pkgs\manifests\path_to_manifest" -Verbose -SubscriptionName "XXX"
VERBOSE: Populating RepositorySourceLocation property for module Az.Resources.
VERBOSE: Populating RepositorySourceLocation property for module Az.Accounts.
VERBOSE: Populating RepositorySourceLocation property for module Az.Accounts.
VERBOSE: Populating RepositorySourceLocation property for module Az.Websites.
VERBOSE: Populating RepositorySourceLocation property for module Az.Functions.
VERBOSE: Validating connection to azure, will attempt to connect if not already connected.
VERBOSE: Connected to Azure
VERBOSE: No Subscription Name or Subscription Id provided. Will test connection to default Azure Subscription 
VERBOSE: Determines the Azure Function Resource Group Name
VERBOSE: Verifying that the Azure Resource XXX exists..
VERBOSE: Azure Resources:
           Azure Function Exists:       False
           Azure Resource Group Exists: True
Write-Error: D:\b\winget-cli-restsource\bin\Library\Add-WinGetManifest.ps1:86:19
Line |
  86 |  …   $Result = Test-AzureResource -FunctionName $AzureFunctionName -Reso …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Both the Azure Function and Resource Group Names can not be null and must exist. Please
     | verify that the Azure function and Resource Group exist.

Exception: D:\b\winget-cli-restsource\bin\Library\Add-WinGetManifest.ps1:88:13
Line |
  88 |              throw "Failed to confirm resources exist in Azure. Please …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Failed to confirm resources exist in Azure. Please verify and try again.
@ghost ghost added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Oct 4, 2022
@ghost
Copy link
Author

ghost commented Oct 4, 2022

Sorry, I mislabeled this. This should be be Issue-Bug.

@RDMacLachlan RDMacLachlan added Issue-Bug and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Oct 5, 2022
@RDMacLachlan RDMacLachlan self-assigned this Oct 5, 2022
@RDMacLachlan
Copy link
Member

Thank you for the feedback.

@denelon denelon added this to the 1.9-REST milestone Oct 4, 2024
@denelon denelon added this to WinGet Oct 22, 2024
@denelon denelon moved this to To Do in WinGet Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

2 participants