File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const process = require('process');
88const server = require ( './server/schema' ) ;
99const fs = require ( 'fs' ) ;
1010const os = require ( 'os' ) ;
11+ const fixPath = require ( 'fix-path' ) ;
1112// Connect to mongodb
1213const MongoClient = require ( 'mongodb' ) . MongoClient ;
1314// Executing terminal commands using JS
@@ -120,11 +121,14 @@ if (!fs.existsSync(path.join(process.resourcesPath, "/schemafiles/"))) {
120121}
121122let testpath = path . join ( process . resourcesPath , "/schemafiles/qlens.json" )
122123
124+ if ( process . resourcesPath !== 'win32' ) fixPath ( )
123125
124126ipcMain . 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 ) )
You can’t perform that action at this time.
0 commit comments