Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlatpakOptions.files has inconsistent type #8160

Open
rotu opened this issue Mar 31, 2024 · 1 comment
Open

FlatpakOptions.files has inconsistent type #8160

rotu opened this issue Mar 31, 2024 · 1 comment

Comments

@rotu
Copy link
Contributor

rotu commented Mar 31, 2024

  • Electron-Builder Version: 8e36be1
  • Node Version: N/A
  • Electron Version: N/A
  • Electron Type (current, beta, nightly): N/A
  • Target: Linux

Type FlatpakOptions is incompatible with PlatformSpecificBuildOptions due to conflicting types of the files property.

PlatformSpecificBuildOptions:

files?: Array<FileSet | string> | FileSet | string | null

whereas FlatpakOptions:

/**
* Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).
*
* See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).
*/
readonly files?: [string, string][]

These two objects are merged together in FlatpakTarget but the type incompatibility is obscured behind an as any cast.

export default class FlatpakTarget extends Target {
readonly options: FlatpakOptions = {
...this.packager.platformSpecificBuildOptions,
...(this.packager.config as any)[this.name],
}

@rotu
Copy link
Contributor Author

rotu commented Mar 31, 2024

Found during development on macOS. I'm not sure the actual runtime implications of this since I'm not on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant