Skip to content

Commit 9605c2a

Browse files
authored
Merge pull request #29 from stevenlabrie/StevensBranch
packaged electron for mac
2 parents 5db1e64 + 0097046 commit 9605c2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/electron.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const process = require('process');
88
const server = require('./server/schema');
99
const fs = require('fs');
1010
const os = require('os');
11+
const fixPath = require('fix-path');
1112
// Connect to mongodb
1213
const MongoClient = require('mongodb').MongoClient;
1314
// Executing terminal commands using JS
@@ -120,11 +121,14 @@ if (!fs.existsSync(path.join(process.resourcesPath, "/schemafiles/"))) {
120121
}
121122
let testpath = path.join(process.resourcesPath, "/schemafiles/qlens.json")
122123

124+
if (process.resourcesPath !== 'win32') fixPath()
123125

124126
ipcMain.on('URI', (event, arg) => {
127+
125128
// Connect to mongodb
126129
MongoClient.connect(arg).then(() => {
127130
const query = `extract-mongo-schema -d "${arg}" -o ${testpath}`;
131+
event.sender.send('console', process.platform)
128132
//Using exec to run extract-mongo-schema package in terminal
129133
exec(query, (error, stdout, stderr) => {
130134
event.sender.send('URI-reply', path.join(process.resourcesPath))

0 commit comments

Comments
 (0)