diff --git a/src/components/Setup.react.js b/src/components/Setup.react.js
index d72a291076..3635092cee 100644
--- a/src/components/Setup.react.js
+++ b/src/components/Setup.react.js
@@ -101,20 +101,18 @@ var Setup = React.createClass({
);
}
+ } else if (util.isNative()) {
+ deleteVmAndRetry = (
+
+ );
+ } else if (this.state.started) {
+ deleteVmAndRetry = (
+
+ );
} else {
- if (util.isNative()) {
- deleteVmAndRetry = (
-
- );
- } else if (this.state.started) {
- deleteVmAndRetry = (
-
- );
- } else {
- deleteVmAndRetry = (
-
- );
- }
+ deleteVmAndRetry = (
+
+ );
}
return (
diff --git a/src/utils/Util.js b/src/utils/Util.js
index 873241ff26..f383506ac9 100644
--- a/src/utils/Util.js
+++ b/src/utils/Util.js
@@ -38,13 +38,19 @@ module.exports = {
return process.platform === 'linux';
},
isNative: function () {
- let native = JSON.parse(localStorage.getItem('settings.useNative'));
+ // let native = JSON.parse(localStorage.getItem('settings.useNative'));
+ let native = null;
if (native === null) {
try {
- let stats = fs.statSync('/var/run/docker.sock');
+ // Check if file exists
+ fs.statSync('/var/run/docker.sock');
native = true;
- } catch(e){
- native = false;
+ } catch (e) {
+ if (this.isLinux()) {
+ native = true;
+ } else {
+ native = false;
+ }
}
}
return native;