Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
super();
// import OSX path variables so you can use gcloud
fixPath();
log.info("PATH: " + process.env.PATH);
// getAppPath seems to be one ../ off when packaged vs dev.
this.resourcesPath = remote.app.getAppPath();
fs.stat(path.join(this.resourcesPath, 'extras'), (err, stat) => {
if (err) {
this.resourcesPath = path.normalize(path.join(this.resourcesPath, '../'));
log.info(`Resource path is ${this.resourcesPath}`);
}
});
this.apps = null;
this.getApps().then((apps) => {
this.apps = apps;
});