Add ability to verify shims and remove orphaned shims
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my problem.
- [X] I have verified this is not an issue for a specific package.
- [X] 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
```bash
Chocolatey v2.0.0
chocolatey 2.0.0
starship 1.15.0
starship.install 1.15.0
3 packages installed.
```
### Output Log
```bash
I'm not on a Windows machine right now, I can add this if necessary.
```
### Additional Context
starship/starship#5227
Contributor guide
Research direction
Start by reproducing the reported behavior with `choco install starship` and inspect how Chocolatey creates shims for packages without executables. Define verification and orphan detection around the reported `starship.exe` paths; done means empty or meta-packages do not receive invalid shims and existing orphaned shims can be identified and removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100