Skip to content
Permalink
Browse files

feat(installer): don't suffix temp install files with .forge-install

  • Loading branch information
malept authored and MarshallOfSound committed Dec 31, 2016
1 parent fb56c54 commit 1c2bfd81fa671016603c9d41f79512ca7785999e
Showing with 2 additions and 11 deletions.
  1. +1 −1 src/electron-forge-install.js
  2. +1 −10 src/installers/darwin/dmg.js
@@ -109,7 +109,7 @@ const main = async () => {

const tmpdir = path.resolve(os.tmpdir(), 'forge-install');
const pathSafeRepo = repo.replace(/\//g, '-').replace(/\\/g, '-');
const filename = `${pathSafeRepo}-${latestRelease.tag_name}-${targetAsset.name}.forge-install`;
const filename = `${pathSafeRepo}-${latestRelease.tag_name}-${targetAsset.name}`;

const fullFilePath = path.resolve(tmpdir, filename);
if (!await fs.exists(fullFilePath) || (await fs.stat(fullFilePath)).size !== targetAsset.size) {
@@ -1,14 +1,5 @@
import fs from 'fs-promise';
import opn from 'opn';
import path from 'path';
import pify from 'pify';
import { exec } from 'child_process';

export default async (filePath) => {
const DMGPath = path.join(path.dirname(filePath), path.parse(filePath).name);
if (await fs.exists(DMGPath)) {
await fs.remove(DMGPath);
}
await pify(exec)(`cp "${filePath}" "${DMGPath}"`);
await opn(DMGPath, { wait: false });
await opn(filePath, { wait: false });
};

0 comments on commit 1c2bfd8

Please sign in to comment.
You can’t perform that action at this time.