Install-ChocolateyInstallPackage docs/function mismatch
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### What You Are Seeing?
Calling Install-ChocolateyInstallPackage for a local .msi without specifying the `-filetype` parameter causes a `ERROR: Exception calling "Start" with "0" argument(s): "The specified executable is not a valid application for this OS platform."`
### What is Expected?
FileType is not required and will be determined if not given. The documenation for Install-ChocolateyInstallPackage includes in the FileType parameter description:
> If this is not provided, Chocolatey will automatically determine this using the downloaded file's extension.
### Observation:
The FileType parameter definition in the function sets the default value to 'exe':
```powershell
[parameter(Mandatory=$false, Position=1)]
[alias("installerType","installType")][string] $fileType = 'exe',
```
Later, there is code to determine the filetype if it wasn't given:
```powershell
if ($fileType -eq '' -or $fileType -eq $null) {
```
but this will never be true due to the default 'exe' assignment.
Contributor guide
Research direction
Start with the Install-ChocolateyInstallPackage function and compare the FileType parameter default with the later empty-or-null check. Verify the behavior for a local .msi without -filetype, then run the relevant existing tests if available. Done means the documented automatic file-type detection works instead of treating the MSI as an executable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100