Skip to content

Commit 2906227

Browse files
stanfieldrdevelar
authored andcommitted
fix(linux): executable breakes if productName given
Closes #1060
1 parent 1c59534 commit 2906227

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/targets/fpm.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ export default class FpmTarget extends Target {
4949
const packager = this.packager
5050
const templateOptions = Object.assign({
5151
// old API compatibility
52-
executable: this.packager.executableName,
52+
executable: packager.executableName,
53+
productFilename: packager.appInfo.productFilename,
5354
}, packager.platformSpecificBuildOptions)
5455

5556
function getResource(value: string | n, defaultFile: string) {
@@ -180,4 +181,4 @@ async function writeConfigFile(tmpDir: TmpDir, templatePath: string, options: an
180181
const outputPath = await tmpDir.getTempFile(path.basename(templatePath, ".tpl"))
181182
await outputFile(outputPath, config)
182183
return outputPath
183-
}
184+
}

templates/linux/after-install.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# Link to the binary
4-
ln -sf '/opt/<%= executable %>/<%= executable %>' '/usr/local/bin/<%= executable %>'
4+
ln -sf '/opt/<%= productFilename %>/<%= executable %>' '/usr/local/bin/<%= executable %>'

0 commit comments

Comments
 (0)