Skip to content

Commit 82dee35

Browse files
authored
Merge pull request #166 from Accedia/develop
Develop
2 parents 28afdec + 66ba50d commit 82dee35

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

electron-app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

electron-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "fit-mitchell-rpa",
33
"appname": "REV Import Technology",
44
"productName": "REV Import Technology",
5-
"version": "1.5.94",
5+
"version": "1.5.95",
66
"homepage": "./",
77
"main": "./dist/main.js",
88
"description": "Automation for CCC by FIT",

electron-app/src/main.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ResponseData } from './interfaces/ResponseData';
2-
import { app, globalShortcut, ipcMain, shell,dialog } from 'electron';
2+
import { app, globalShortcut, ipcMain, shell, dialog } from 'electron';
33
import WindowManager from './utils/window_manager';
44
import importer from './utils/importer';
55
import { MESSAGE } from './constants/messages';
@@ -69,9 +69,12 @@ class Main {
6969
log.info(fitMitchellCloudPath);
7070
const bat = spawn(fitMitchellCloudPath, [], { windowsHide: true });
7171
log.info('here');
72-
72+
bat.on('error', (code) => {
73+
dialog.showErrorBox('Error', `The specified file was not found: ${fitMitchellCloudPath}. Please make sure that file FIT.bat is in the specified directory`);
74+
app.quit();
75+
})
7376
bat.on('close', (code) => {
74-
log.info(`Child process exited with code ${code}`);
77+
log.info(`Child process exited with code ${code}`);
7578
app.quit();
7679
});
7780
return;

electron-app/src/utils/window_manager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ class WindowManager {
8282
if (shouldOpenVBS) {
8383
try {
8484
const bat = spawn(fitMitchellCloudPath, [], { windowsHide: true });
85+
bat.on('error', (code) => {
86+
dialog.showErrorBox('Error', `The specified file was not found: ${fitMitchellCloudPath}. Please make sure that file FIT.bat is in the specified directory`);
87+
app.quit();
88+
})
8589
bat.on('close', (code) => {
8690
console.log(`Child process exited with code ${code}`);
8791
app.quit();
8892
});
89-
bat.on('error', (code) => {
90-
dialog.showErrorBox('Error', `The specified file was not found: ${fitMitchellCloudPath}, Error code : ${code}`);
91-
app.quit();
92-
})
9393
return;
9494
} catch (error) {
9595
dialog.showErrorBox('Error', 'The specified file was not found: C:\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');

0 commit comments

Comments
 (0)