Skip to content

Commit

Permalink
fix(linux): executable breakes if productName given
Browse files Browse the repository at this point in the history
  • Loading branch information
stanfieldr authored and develar committed Dec 29, 2016
1 parent 1c59534 commit 2906227
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/targets/fpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion templates/linux/after-install.tpl
Original file line number Diff line number Diff line change
@@ -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 %>'

0 comments on commit 2906227

Please sign in to comment.