Handle exit codes during version check
This commit is contained in:
@@ -293,6 +293,7 @@ ipcMain.on(Constants.IPC_Check_Daemon_Version, (event, data) => {
|
||||
.then(code => {
|
||||
standardIPCReply(event, Constants.IPC_Check_Daemon_Version_Reply, {
|
||||
Valid: (code === 0),
|
||||
Code: code,
|
||||
});
|
||||
})
|
||||
.catch(e => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import Button from '../../components/UI/Button/Button';
|
||||
import ConfigurationItem from '../../components/ConfigurationItem/ConfigurationItem';
|
||||
import Modal from '../../components/UI/Modal/Modal';
|
||||
import IPCContainer from '../IPCContainer/IPCContainer';
|
||||
import {displayConfiguration} from "../../redux/actions/mount_actions";
|
||||
import {displayConfiguration} from '../../redux/actions/mount_actions';
|
||||
|
||||
const Constants = require('../../constants');
|
||||
|
||||
|
||||
@@ -125,7 +125,13 @@ class MountItems extends IPCContainer {
|
||||
}
|
||||
} else {
|
||||
allowAction = false;
|
||||
this.props.errorHandler("Incompatible " + provider + " daemon. Please upgrade " + provider);
|
||||
if (result.Code === -1) {
|
||||
this.props.errorHandler('Failed to connect to ' + provider + ' daemon');
|
||||
} else if (result.Code === -3) {
|
||||
this.props.errorHandler('Incompatible ' + provider + ' daemon. Please upgrade ' + provider);
|
||||
} else {
|
||||
this.props.errorHandler('Version check failed: ' + result.Error);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
allowAction = false;
|
||||
|
||||
Reference in New Issue
Block a user