From c2dca2114770f6333b765505919bf8a2b0a70e3f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sat, 17 Jun 2017 04:23:00 +1000 Subject: [PATCH] fix(maker): fix debian and redhat maker path calculation --- src/makers/linux/deb.js | 5 +++-- src/makers/linux/rpm.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/makers/linux/deb.js b/src/makers/linux/deb.js index 1b4dfaaa98..f37b38ef84 100644 --- a/src/makers/linux/deb.js +++ b/src/makers/linux/deb.js @@ -22,8 +22,9 @@ export default async ({ dir, targetArch, forgeConfig, packageJSON }) => { const arch = debianArch(targetArch); const userConfig = configFn(forgeConfig.electronInstallerDebian, targetArch); - const versionedName = `${packageJSON.name}_${packageJSON.version}_${arch}`; - const outPath = path.resolve(dir, '../make', `${userConfig.name || versionedName}.deb`); + userConfig.options = userConfig.options || {}; + const versionedName = `${userConfig.options.name || packageJSON.name}_${packageJSON.version}_${arch}`; + const outPath = path.resolve(dir, '../make', `${versionedName}.deb`); await ensureFile(outPath); const debianDefaults = { diff --git a/src/makers/linux/rpm.js b/src/makers/linux/rpm.js index b38c3bb4f9..4bf810d762 100644 --- a/src/makers/linux/rpm.js +++ b/src/makers/linux/rpm.js @@ -22,8 +22,9 @@ export default async ({ dir, targetArch, forgeConfig, packageJSON }) => { const arch = rpmArch(targetArch); const userConfig = configFn(forgeConfig.electronInstallerRedhat, targetArch); - const versionedName = `${packageJSON.name}-${packageJSON.version}.${arch}`; - const outPath = path.resolve(dir, '../make', `${userConfig.name || versionedName}.rpm`); + userConfig.options = userConfig.options || {}; + const versionedName = `${userConfig.options.name || packageJSON.name}-${packageJSON.version}.${arch}`; + const outPath = path.resolve(dir, '../make', `${versionedName}.rpm`); await ensureFile(outPath); const rpmDefaults = {