microsoft / devcenter-catalog

MIT License
26 stars 78 forks source link

The WinGet task doesn't work because WithRetry is not defined #59

Open MarkOsborneMS opened 7 months ago

MarkOsborneMS commented 7 months ago

Describe the bug When I try and run the WinGet task using the DevBox CLI I get the following error: "stderr":"WithRetry : The term 'WithRetry' is not recognized as the name of a cmdlet, function, script file, or operable program.

To Reproduce Steps to reproduce the behavior:

  1. Attach our catalog that contains the WinGet task from the microsoft/devcenter-catalog (github.com)
  2. Create a devbox.yaml that uses the WinGet task
  3. Run the devbox.yaml on a dev box using the DevBox CLI
  4. See error "stderr":"WithRetry : The term 'WithRetry' is not recognized as the name of a cmdlet, function, script file, or operable program.

Expected behavior It works

Additional context In Tasks/winget/main.ps1

WithRetry is used but not defined and generates the following error when I try and run a WinGet task using the DevBox CLI:

"stderr":"WithRetry : The term 'WithRetry' is not recognized as the name of a cmdlet, function, script file, or operable program.

It looks like the code was copied from the git-clone task but WithRetry function was missed.

davidzenisu commented 7 months ago

Just ran into the exact same issue.

MarkOsborneMS commented 6 months ago

Proposed fix in PR #61