Skip to content
Permalink
Browse files

fix(alias): fix the forge alias so that it can run the make command

  • Loading branch information
MarshallOfSound authored and malept committed Jan 14, 2017
1 parent b678333 commit 725e6b06f09634424f78636d72bde814d4b80e06
Showing with 5 additions and 2 deletions.
  1. +4 −1 gulpfile.babel.js
  2. +1 −1 src/electron-forge-make.js
@@ -28,7 +28,10 @@ gulp.task('link', () => {

if (packageJSON.bin[binName] === packageJSON.bin['electron-forge']) {
files.forEach((fileName) => {
fs.writeFileSync(path.resolve(__dirname, `./dist/${fileName.replace('electron-forge', binName)}`), `require('./${fileName}');`);
fs.writeFileSync(
path.resolve(__dirname, `./dist/${fileName.replace('electron-forge', binName)}`),
`/* Auto-generated bin alias file */\nglobal.__LINKED_FORGE__ = true;\nrequire('./${fileName}');\n`
);
});
}
});
@@ -38,7 +38,7 @@ export const getMakeOptions = () => {
return makeOpts;
};

if (process.mainModule === module) {
if (process.mainModule === module || global.__LINKED_FORGE__) {
(async () => {
const makeOpts = getMakeOptions();

0 comments on commit 725e6b0

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