electron / electron/forge

`setupIcon` in `@electron-forge/maker-squirrel` config does not make use of `fromBuildIdentifier`

Open
#3,167 1 comment 2 reactions 0 assignees View on GitHub
bug build-identifier config maker/squirrel
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron/forge/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 uses.
- [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

### Problem description

If I set `setupIcon` to the result of `fromBuildIdentifier`, I get `Fatal error: Unable to set icon`.
```js
{
name: '@electron-forge/maker-squirrel',
config: {
name: fromBuildIdentifier({ beta: 'Beta', prod: 'Prod' }), // works
setupIcon: fromBuildIdentifier({ beta: './assets/betaSetup.ico', prod: './assets/prodSetup.ico' }), // does not work
},
},
```

### Proposed solution

It seems as though `name` works correctly but not `setupIcon`. So, it just needs to be proxified like `name`.

### Alternatives considered

As a workaround, I am able to do:
```js
{
name: '@electron-forge/maker-squirrel',
config: {
name: fromBuildIdentifier({ beta: 'Beta', prod: 'Prod' }), // works
setupIcon: fromBuildIdentifier({ beta: './assets/betaSetup.ico', prod: './assets/prodSetup.ico' }).map[buildIdentifier], // works
},
},
```

Where `buildIdentifier` is defined as a constant at the top of the config file.

### Additional information

I am using 6.0.5.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.