electron / electron/packager

Unable to use `binaries` option to sign additional binaries

Open
#1,723 6 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
TypeScript
Stars
302
Forks
42
Avg merge
5h 40m
Merged PRs (30d)
7

Description

### Preflight Checklist

* [x] I have read the [contribution documentation](https://github.com/electron/packager/blob/main/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
* [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Issue Details

* **Electron Packager Version:**
* Not relevant
* **Electron Version:**
* Not relevant
* **Operating System:**
* Not relevant
* **Last Known Working Electron Packager version:**:
* Not relevant

### Expected Behavior
I should be able to use `binaries` in `osxSign` to sign additional binaries.

### Actual Behavior
The TypeScript definition explicitly removes the `binaries` key using `Omit` which results in this error:
```
forge.config.ts:15:7 - error TS2322: Type '{ binaries: string[]; optionsForFile: () => { entitlements: string; }; }' is not assignable to type 'true | OsxSignOptions'.
Object literal may only specify known properties, and 'binaries' does not exist in type 'OsxSignOptions'.
```

### To Reproduce
```typescript
const config: ForgeConfig = {
...
packagerConfig: {
osxSign: {
binaries: ["./path/to/extra/binary"],
},
},
};
```

### Additional Information
`binaries` has been omitted since the `OsxSignOptions` type was introduced in a2a3ae559d402a0ce36a00cd0e9ceab6bcaba2db

Contributor guide

Open the contributing guide

Research direction

Inspect the TypeScript definition for OsxSignOptions and the change introduced in commit a2a3ae559d402a0ce36a00cd0e9ceab6bcaba2db. Confirm that the binaries option from the documented osxSign configuration is accepted, then verify the provided ForgeConfig example type-checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.