microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.54k stars 1.39k forks source link

Ensure Agreements don't terminate in dependency flow #4594

Closed Trenly closed 2 days ago

Trenly commented 2 days ago

This PR makes it so that the prompt is actually shown when a dependency contains agreements.

Manually Tested ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Microsoft.PowerBI Microsoft.ServiceFabricRuntime Agreements for Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 Version: 2.130.930.0 Publisher: Microsoft Corporation Publisher Url: https://www.microsoft.com/en-us Publisher Support Url: https://support.microsoft.com/en-us Author: Microsoft Corporation Homepage: https://powerbi.microsoft.com License: Proprietary License Url: https://powerbi.microsoft.com/en-us/desktop-eula/ Privacy Url: https://privacy.microsoft.com/en-us/privacystatement Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx Agreements: End User License Agreement (EULA): https://powerbi.microsoft.com/en-us/desktop-eula/ Agreements for Microsoft Azure Service Fabric [Microsoft.ServiceFabricRuntime] Version 10.0.1949.9590 Version: 10.0.1949.9590 Publisher: Microsoft Corporation Publisher Url: https://github.com/microsoft/service-fabric Publisher Support Url: https://github.com/microsoft/service-fabric/issues Author: Microsoft Corporation Homepage: https://github.com/microsoft/service-fabric License: MIT License License Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Agreements: End User License Agreement (EULA): https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm The publisher requires that you view the above information and accept the agreements before installing. Do you agree to the terms? [Y] Yes [N] No: y (1/2) Found Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. ```
Works with `--disable-interactivity` ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 --disable-interactivity Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Microsoft.PowerBI Microsoft.ServiceFabricRuntime Agreements for Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 Version: 2.130.930.0 Publisher: Microsoft Corporation Publisher Url: https://www.microsoft.com/en-us Publisher Support Url: https://support.microsoft.com/en-us Author: Microsoft Corporation Homepage: https://powerbi.microsoft.com License: Proprietary License Url: https://powerbi.microsoft.com/en-us/desktop-eula/ Privacy Url: https://privacy.microsoft.com/en-us/privacystatement Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx Agreements: End User License Agreement (EULA): https://powerbi.microsoft.com/en-us/desktop-eula/ Agreements for Microsoft Azure Service Fabric [Microsoft.ServiceFabricRuntime] Version 10.0.1949.9590 Version: 10.0.1949.9590 Publisher: Microsoft Corporation Publisher Url: https://github.com/microsoft/service-fabric Publisher Support Url: https://github.com/microsoft/service-fabric/issues Author: Microsoft Corporation Homepage: https://github.com/microsoft/service-fabric License: MIT License License Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Agreements: End User License Agreement (EULA): https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm Package agreements were not agreed to. Operation cancelled. ```
Works with `--accept-package-agreements` ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 --accept-package-agreements Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Microsoft.PowerBI Microsoft.ServiceFabricRuntime Agreements for Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 Version: 2.130.930.0 Publisher: Microsoft Corporation Publisher Url: https://www.microsoft.com/en-us Publisher Support Url: https://support.microsoft.com/en-us Author: Microsoft Corporation Homepage: https://powerbi.microsoft.com License: Proprietary License Url: https://powerbi.microsoft.com/en-us/desktop-eula/ Privacy Url: https://privacy.microsoft.com/en-us/privacystatement Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx Agreements: End User License Agreement (EULA): https://powerbi.microsoft.com/en-us/desktop-eula/ Agreements for Microsoft Azure Service Fabric [Microsoft.ServiceFabricRuntime] Version 10.0.1949.9590 Version: 10.0.1949.9590 Publisher: Microsoft Corporation Publisher Url: https://github.com/microsoft/service-fabric Publisher Support Url: https://github.com/microsoft/service-fabric/issues Author: Microsoft Corporation Homepage: https://github.com/microsoft/service-fabric License: MIT License License Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Agreements: End User License Agreement (EULA): https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm (1/2) Found Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://download.microsoft.com/download/8/8/0/880BCA75-79DD-466A-927D-1ABF1F5454B0/PBIDesktopSetup_x64.exe ```
Works when source agreements have not been agreed to first ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). Do you agree to all the source agreements terms? [Y] Yes [N] No: y This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Microsoft.PowerBI Microsoft.ServiceFabricRuntime Agreements for Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 Version: 2.130.930.0 Publisher: Microsoft Corporation Publisher Url: https://www.microsoft.com/en-us Publisher Support Url: https://support.microsoft.com/en-us Author: Microsoft Corporation Homepage: https://powerbi.microsoft.com License: Proprietary License Url: https://powerbi.microsoft.com/en-us/desktop-eula/ Privacy Url: https://privacy.microsoft.com/en-us/privacystatement Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx Agreements: End User License Agreement (EULA): https://powerbi.microsoft.com/en-us/desktop-eula/ Agreements for Microsoft Azure Service Fabric [Microsoft.ServiceFabricRuntime] Version 10.0.1949.9590 Version: 10.0.1949.9590 Publisher: Microsoft Corporation Publisher Url: https://github.com/microsoft/service-fabric Publisher Support Url: https://github.com/microsoft/service-fabric/issues Author: Microsoft Corporation Homepage: https://github.com/microsoft/service-fabric License: MIT License License Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Agreements: End User License Agreement (EULA): https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm The publisher requires that you view the above information and accept the agreements before installing. Do you agree to the terms? [Y] Yes [N] No: ``` ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 --disable-interactivity Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). One or more of the source agreements were not agreed to. Operation cancelled. Please accept the source agreements or remove the corresponding sources. ``` ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 --accept-package-agreements Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). Do you agree to all the source agreements terms? [Y] Yes [N] No: y This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Microsoft.PowerBI Microsoft.ServiceFabricRuntime Agreements for Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 Version: 2.130.930.0 Publisher: Microsoft Corporation Publisher Url: https://www.microsoft.com/en-us Publisher Support Url: https://support.microsoft.com/en-us Author: Microsoft Corporation Homepage: https://powerbi.microsoft.com License: Proprietary License Url: https://powerbi.microsoft.com/en-us/desktop-eula/ Privacy Url: https://privacy.microsoft.com/en-us/privacystatement Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx Agreements: End User License Agreement (EULA): https://powerbi.microsoft.com/en-us/desktop-eula/ Agreements for Microsoft Azure Service Fabric [Microsoft.ServiceFabricRuntime] Version 10.0.1949.9590 Version: 10.0.1949.9590 Publisher: Microsoft Corporation Publisher Url: https://github.com/microsoft/service-fabric Publisher Support Url: https://github.com/microsoft/service-fabric/issues Author: Microsoft Corporation Homepage: https://github.com/microsoft/service-fabric License: MIT License License Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Agreements: End User License Agreement (EULA): https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm (1/2) Found Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 ```
Works with `--accept-source-agreements` ``` PS C:\Users\Trenly> wingetdev install -m E:\winget-pkgs\manifests\m\Microsoft\ServiceFabricSDK\7.0.1949.9590 --accept-source-agreements Found Microsoft Azure Service Fabric SDK [Microsoft.ServiceFabricSDK] Version 7.0.1949.9590 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). This package requires the following dependencies: - Packages Microsoft.VCRedist.2015+.x64 Microsoft.PowerBI Microsoft.ServiceFabricRuntime Agreements for Microsoft PowerBI Desktop [Microsoft.PowerBI] Version 2.130.930.0 Version: 2.130.930.0 Publisher: Microsoft Corporation Publisher Url: https://www.microsoft.com/en-us Publisher Support Url: https://support.microsoft.com/en-us Author: Microsoft Corporation Homepage: https://powerbi.microsoft.com License: Proprietary License Url: https://powerbi.microsoft.com/en-us/desktop-eula/ Privacy Url: https://privacy.microsoft.com/en-us/privacystatement Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx Agreements: End User License Agreement (EULA): https://powerbi.microsoft.com/en-us/desktop-eula/ Agreements for Microsoft Azure Service Fabric [Microsoft.ServiceFabricRuntime] Version 10.0.1949.9590 Version: 10.0.1949.9590 Publisher: Microsoft Corporation Publisher Url: https://github.com/microsoft/service-fabric Publisher Support Url: https://github.com/microsoft/service-fabric/issues Author: Microsoft Corporation Homepage: https://github.com/microsoft/service-fabric License: MIT License License Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Copyright: Copyright (c) Microsoft Corporation. All rights reserved. Copyright Url: https://github.com/microsoft/service-fabric/blob/master/LICENSE Agreements: End User License Agreement (EULA): https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm The publisher requires that you view the above information and accept the agreements before installing. Do you agree to the terms? [Y] Yes [N] No: ```

Microsoft Reviewers: Open in CodeFlow
yao-msft commented 2 days ago

/azp run

azure-pipelines[bot] commented 2 days ago
Pipelines were unable to run due to time out waiting for the pull request to finish merging.
yao-msft commented 2 days ago

/azp run

azure-pipelines[bot] commented 2 days ago
Azure Pipelines successfully started running 1 pipeline(s).