microsoft / microsoft/devcenter-catalog

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

Open
#59 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
52
Forks
194
Avg merge
16h 53m
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Tasks/winget/main.ps1 and reproduce the failure by running a devbox.yaml containing the WinGet task through the DevBox CLI. Compare it with Tasks/git-clone/main.ps1, especially the WithRetry function around line 69. Done means the WinGet task runs without the WithRetry command-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.