Skip to content

Chocolatey 2.0 creates shims for virtual/meta-pacakge #3204

@davidkna

Description

@davidkna

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.

What You Are Seeing?

Chocolatey creates for a meta-package that does not contain any executables.

What is Expected?

No shim is created.

How Did You Get This To Happen?

  1. Run: choco install starship
  2. Observe that chocolatey creates a shim C:\ProgramData\chocolatey\lib\starship\lib\starship\tools\starship.exe, despite the package being empty.
  3. Invoke-Expression (&starship init powershell) no longer works properly: C:\ProgramData\chocolatey\lib\starship\tools\starship.exe: The term 'C:\ProgramData\chocolatey\lib\starship\tools\starship.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

System Details

  • Operating System: 10.0.22621.0
  • Windows PowerShell version: 7.3.4
  • Chocolatey CLI Version: 2.0.0
  • Chocolatey Licensed Extension version:
  • Chocolatey License type: Foss
  • Terminal/Emulator: Microsoft Terminal

Installed Packages

Chocolatey v2.0.0
chocolatey 2.0.0
starship 1.15.0
starship.install 1.15.0
3 packages installed.

Output Log

I'm not on a Windows machine right now, I can add this if necessary.

Additional Context

starship/starship#5227

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - BacklogIssue is accepted, but is not ready to be worked on or not in current sprint.BugIssues where something has happened which was not expected or intended.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions