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

Repair-WinGetPackageManager failing due to dependencies #4228

Closed
denelon opened this issue Mar 4, 2024 · 2 comments
Closed

Repair-WinGetPackageManager failing due to dependencies #4228

denelon opened this issue Mar 4, 2024 · 2 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@denelon
Copy link
Contributor

denelon commented Mar 4, 2024

Brief description of your issue

When I run Repair-WinGetPackageManager in the Windows Sandbox it's failing to complete.

Steps to reproduce

Run the following as a configuration to configure and start Windows Sandbox.

Note: The Windows Sandbox feature must be enabled.

# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2

###############################################################################
# Create Windows Sandbox instance with WinGet installed.                      #
# Run as Administrator                                                        #
# Mount C:\Sandbox on the local filesystem into the Sandbox filesystem.       #
# The Logon command performs the following steps in Windows PowerShell:       #
# 1. Install Nuget package provider                                           #
# 2. Install Microsoft.WinGet.Client (0.2.1) PS module from the PS gallery.   #
# 3. Set the execution policy to RemoteSigned                                 #
# 4. Run Repair-WingetPackageManager to install App Installer (WinGet).       #
# Note: Modifying the C:\Sandbox directory contents in Windows Sanbox         #
#       will also modify C:\Sandbox on the Host filesystem.                   #
############################################################################### 

properties:
  resources:
    - resource: Microsoft.WindowsSandbox.DSC/WindowsSandbox
      directives:
        description: Create Windows Sandbox with Winget installed
        allowPrerelease: true
      settings:
        Ensure: Present        
        HostFolder: C:\Sandbox
        SandboxFolder: C:\Sandbox
        LogonCommand: >
          cmd /c start powershell -NoExit -Command "Write-Host 'Installing NuGet package provider...';
          Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force;
          Write-Host `n'Installing Microsoft.WinGet.Client PowerShell module...' `n;
          Install-Module Microsoft.WinGet.Client -Repository PSGallery -Force;
          Write-Host 'Setting execution policy to remote signed...' `n;
          Set-ExecutionPolicy RemoteSigned -Force;
          Write-Host 'Running the Repair-WinGetPackageManager cmdlet to install App Installer (WinGet)...' `n;
          Repair-WingetPackageManager;
  configurationVersion: 0.2.0

Expected behavior

The sandbox should launch and WinGet should be configured.

Actual behavior

Repair-WinGetPackageManager is failing.

Environment

Microsoft.WinGet.Client
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Mar 4, 2024
Copy link

github-actions bot commented Mar 4, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@denelon
Copy link
Contributor Author

denelon commented Mar 4, 2024

PR in progress:

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Mar 4, 2024
@denelon denelon added this to the 1.10 Client milestone Nov 14, 2024
@denelon denelon closed this as completed Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

1 participant