diff --git a/packages/app-builder-lib/src/targets/LinuxTargetHelper.ts b/packages/app-builder-lib/src/targets/LinuxTargetHelper.ts
index 92f87a62281..ec86b67d1fb 100644
--- a/packages/app-builder-lib/src/targets/LinuxTargetHelper.ts
+++ b/packages/app-builder-lib/src/targets/LinuxTargetHelper.ts
@@ -36,7 +36,7 @@ export class LinuxTargetHelper {
${fileAssociation.description ? `${fileAssociation.description}` : ""}
- `
+`
items.push(data)
}
diff --git a/packages/app-builder-lib/src/targets/fpm.ts b/packages/app-builder-lib/src/targets/fpm.ts
index c120e8f1d47..2766924264b 100644
--- a/packages/app-builder-lib/src/targets/fpm.ts
+++ b/packages/app-builder-lib/src/targets/fpm.ts
@@ -212,6 +212,7 @@ export default class FpmTarget extends Target {
DYLD_LIBRARY_PATH: computeEnv(process.env.DYLD_LIBRARY_PATH, [path.join(linuxToolsPath, "lib")]),
})
}
+
await executeAppBuilder(["fpm", "--configuration", JSON.stringify(fpmConfiguration)], undefined, {env})
await packager.dispatchArtifactCreated(artifactPath, this, arch)
diff --git a/test/out/linux/__snapshots__/debTest.js.snap b/test/out/linux/__snapshots__/debTest.js.snap
index d905b590a54..cd66aa3380f 100644
--- a/test/out/linux/__snapshots__/debTest.js.snap
+++ b/test/out/linux/__snapshots__/debTest.js.snap
@@ -415,6 +415,17 @@ Object {
exports[`deb file associations 4`] = `"Test Application (test quite “ #378)"`;
+exports[`deb file associations 5`] = `
+"
+
+
+
+
+
+
+"
+`;
+
exports[`no quotes for safe exec name 1`] = `
"[Desktop Entry]
Name=foo
diff --git a/test/src/helpers/packTester.ts b/test/src/helpers/packTester.ts
index 3329b8a901e..45f4519f4c4 100644
--- a/test/src/helpers/packTester.ts
+++ b/test/src/helpers/packTester.ts
@@ -274,6 +274,7 @@ async function checkLinuxResult(outDir: string, packager: Packager, arch: Arch,
const control = parseDebControl(await execShell(`ar p '${packageFile}' control.tar.gz | ${await getTarExecutable()} zx --to-stdout ./control`, {
maxBuffer: 10 * 1024 * 1024,
}))
+
delete control.Version
delete control.Size
const description = control.Description
@@ -397,9 +398,9 @@ async function checkWindowsResult(packager: Packager, checkOptions: AssertPackOp
}
}
-const execShell: any = BluebirdPromise.promisify(require("child_process").exec)
+export const execShell: any = BluebirdPromise.promisify(require("child_process").exec)
-async function getTarExecutable() {
+export async function getTarExecutable() {
return process.platform === "darwin" ? path.join(await getLinuxToolsPath(), "bin", "gtar") : "tar"
}
diff --git a/test/src/linux/debTest.ts b/test/src/linux/debTest.ts
index 3fb3348a6e9..1bc466e9b5a 100644
--- a/test/src/linux/debTest.ts
+++ b/test/src/linux/debTest.ts
@@ -1,6 +1,6 @@
import { Arch, Platform } from "electron-builder"
import { promises as fs } from "fs"
-import { app } from "../helpers/packTester"
+import { app, execShell, getTarExecutable } from "../helpers/packTester"
test.ifNotWindows("deb", app({
targets: Platform.LINUX.createTarget("deb"),
@@ -46,4 +46,11 @@ test.ifNotWindows.ifNotCiMac.ifAll("deb file associations", app({
}
],
},
+}, {
+ packed: async context => {
+ const mime = await execShell(`ar p '${context.outDir}/TestApp_1.1.0_amd64.deb' data.tar.xz | ${await getTarExecutable()} Jx --to-stdout ./usr/share/mime/packages/testapp.xml`, {
+ maxBuffer: 10 * 1024 * 1024,
+ })
+ expect(mime.trim()).toMatchSnapshot()
+ }
}))
\ No newline at end of file