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

[Bug]: Error when running some commands: Get-Job : The command cannot find the job because the job name wg was not found #22

Open
5 tasks done
thx1200 opened this issue Feb 15, 2023 · 3 comments
Assignees
Labels
bug Something isn't working triage new issue that needs review

Comments

@thx1200
Copy link

thx1200 commented Feb 15, 2023

Describe the problem

When running Get-WGInstalled and Get-WGUpgrade, I get the below error. Running the same commands using "winget" does work.

WARNING: There was a problem getting a list of installed packages.
Get-Job : The command cannot find the job because the job name wg was not found. Verify the value of the Name parameter, and then try the
command again.
At C:\Program Files\WindowsPowerShell\Modules\WingetTools\1.7.0\functions\Get-WGInstalled.ps1:122 char:13
+         if (Get-Job -Name wg) {
+             ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (wg:String) [Get-Job], PSArgumentException
    + FullyQualifiedErrorId : JobWithSpecifiedNameNotFound,Microsoft.PowerShell.Commands.GetJobCommand

Expectation

List of packages or starting the upgrade.

Additional Information

Test-WGVersion
Installed : 1.4.10173
Online : 1.4.10173
Update : False

PowerShell version

5.1

Platform

Windows 10 Pro or Enterprise

Additional Checks

  • You are using the latest version of this module.
  • You have read this repository's README file.
  • You have read full help and examples for the command you are having problems with.
  • You are running PowerShell in an elevated session.
  • You are running in a traditional PowerShell console or Windows Terminal
@thx1200 thx1200 added bug Something isn't working triage new issue that needs review labels Feb 15, 2023
@jdhitsolutions
Copy link
Owner

This doesn't surprise me. I have been deferring work on this module. The Winget team is working on a new PowerShell module, https://github.com/microsoft/winget-cli/releases/tag/v1.5.441-preview. I am hoping they will eventually release something that makes this module obsolete. Parsing text and YAML is a poor way to use PowerShell, but it was the only way to manage winget.

@thx1200
Copy link
Author

thx1200 commented Feb 15, 2023

I tried the official PS Module but it requires PS7 and I was hoping to find something that works with PS5 just so I don't have another dependency and installation I have to push before being able to automate winget via PS. My end goal is I'm just trying to simplify installation and update of a bunch of third party apps across a large number of computers with only Microsoft tooling, but the deeper I dig, the more I realize winget is just not ready for primetime yet. :-)

I never understood why they chose to make it a appx bundle to begin with, those have so many unnecessary complications and aren't supported (easily) on Server, and just seems like an odd decision for what should be a relatively simple command line tool. That's not even getting into why a package manager on Windows isn't "powershell first" from the start but I digress, these have been discussions and criticisms since the beginning of winget. lol.

Thanks for the help!

@jdhitsolutions
Copy link
Owner

You bring up valid points that have been discussed for years since winget first came out. I'm hoping their PowerShell module can eventually be made available downlevel. I'm also pushing them to add a format output so I can get JSON results. If I can get JSON, that will solve so many of the challenges with my module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage new issue that needs review
Projects
None yet
Development

No branches or pull requests

2 participants