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

'clist' #225

Open
Yapper27 opened this issue Sep 24, 2024 · 1 comment
Open

'clist' #225

Yapper27 opened this issue Sep 24, 2024 · 1 comment

Comments

@Yapper27
Copy link

& : The term 'clist' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Program Files\WindowsPowerShell\Scripts\pwshfetch-test-1.ps1:843 char:24

  •     $chocopkg = (& clist -l)[-1].Split(' ')[0] - 1
    
  •                    ~~~~~llll
    
    • CategoryInfo : ObjectNotFound: (clist:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

image

@Enayut
Copy link

Enayut commented Sep 27, 2024

Were you following this guide???
Customize & Beautify Your Windows Terminal (2022 Edition)

In the article, they used the following command:

Install-Script -Name pwshfetch-test-1

If you open the pwshfetch-test-1.ps1 file located in C:\Program Files\WindowsPowerShell\Scripts, you’ll notice that they used a deprecated feature, clist.

Here's an excerpt from the script:

if ("choco" -in $ShowPkgs -and (Get-Command -Name choco -ErrorAction Ignore)) {
    $chocopkg = (& clist -l)[-1].Split(' ')[0] - 1

    if ($chocopkg) {
        $pkgs += "$chocopkg (choco)"
    }
}

You can resolve this by either installing the latest version or simply replacing clist with choco list -l in the script. This worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants