refactor: replace Object.assign with spread syntax

This commit is contained in:
2026-10-29 01:17:10 +03:00
parent 05be4ab622
commit f417fcac73
8 changed files with 30 additions and 27 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export class LinuxDEBPacker extends Packer {
const target = this.targetPath;
const buildDir = path.join(os.tmpdir(), "build", this.config.name, "debian");
const iconfile = `${this.config.meta.filename}${path.extname(this.config.meta.icon!)}`;
const desktop = template.render("linux/app.desktop", Object.assign({ iconfile: iconfile }, this.config));
const desktop = template.render("linux/app.desktop", { iconfile: iconfile, ...this.config });
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
fs.writeFileSync(`${buildDir}/usr/share/applications/${this.config.meta.filename}.desktop`, desktop);
fse.copySync(`${target}`, `${buildDir}/usr/share/${this.config.meta.filename}/`);