From 2906227d9cd41a3d2e131d5233ee897968c01b5b Mon Sep 17 00:00:00 2001 From: Robert Stanfield Date: Thu, 29 Dec 2016 09:53:05 +0100 Subject: [PATCH] fix(linux): executable breakes if productName given Closes #1060 --- src/targets/fpm.ts | 5 +++-- templates/linux/after-install.tpl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/targets/fpm.ts b/src/targets/fpm.ts index 0d3dfff8daf..ea97e2ef786 100644 --- a/src/targets/fpm.ts +++ b/src/targets/fpm.ts @@ -49,7 +49,8 @@ export default class FpmTarget extends Target { const packager = this.packager const templateOptions = Object.assign({ // old API compatibility - executable: this.packager.executableName, + executable: packager.executableName, + productFilename: packager.appInfo.productFilename, }, packager.platformSpecificBuildOptions) function getResource(value: string | n, defaultFile: string) { @@ -180,4 +181,4 @@ async function writeConfigFile(tmpDir: TmpDir, templatePath: string, options: an const outputPath = await tmpDir.getTempFile(path.basename(templatePath, ".tpl")) await outputFile(outputPath, config) return outputPath -} \ No newline at end of file +} diff --git a/templates/linux/after-install.tpl b/templates/linux/after-install.tpl index dac9990edcd..083ecc7e52a 100644 --- a/templates/linux/after-install.tpl +++ b/templates/linux/after-install.tpl @@ -1,4 +1,4 @@ #!/bin/bash # Link to the binary -ln -sf '/opt/<%= executable %>/<%= executable %>' '/usr/local/bin/<%= executable %>' +ln -sf '/opt/<%= productFilename %>/<%= executable %>' '/usr/local/bin/<%= executable %>'