Skip to content
Permalink
Browse files

fix(plugin-local-electron): new config setup means that a configfetch…

…er is passed to the plugin not
  • Loading branch information
MarshallOfSound committed Jul 4, 2018
1 parent d61f94c commit 37a1e071b4365f69ce28c458e7dd0b56fcd2b73b
Showing with 5 additions and 8 deletions.
  1. +5 −8 packages/plugin/local-electron/src/LocalElectronPlugin.ts
@@ -7,18 +7,15 @@ import { LocalElectronPluginConfig } from './Config';
export default class LocalElectronPlugin extends PluginBase<LocalElectronPluginConfig> {
name = 'local-electron';

constructor(config: LocalElectronPluginConfig) {
super(config);
get enabled() {
if (typeof this.config.enabled === 'undefined') {
this.config = {
...this.config,
enabled: true,
};
return true;
}
return this.config.enabled;
}

async startLogic() {
if (this.config.enabled) {
if (this.enabled) {
this.checkPlatform(process.platform);
process.env.ELECTRON_OVERRIDE_DIST_PATH = this.config.electronPath;
}
@@ -45,7 +42,7 @@ export default class LocalElectronPlugin extends PluginBase<LocalElectronPluginC
}

private afterExtract = async (_: any, buildPath: string, __: any, platform: string, arch: string) => {
if (!this.config.enabled) return;
if (!this.enabled) return;

this.checkPlatform(platform);
this.checkArch(arch);

0 comments on commit 37a1e07

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