mirror of https://github.com/docker/docs.git
Fixes for some minor errors
This commit is contained in:
parent
6933a158ee
commit
f1b6efee80
|
@ -6,6 +6,7 @@ var Radial = require('./Radial.react');
|
||||||
var ImageCard = require('./ImageCard.react');
|
var ImageCard = require('./ImageCard.react');
|
||||||
var Promise = require('bluebird');
|
var Promise = require('bluebird');
|
||||||
var metrics = require('../utils/MetricsUtil');
|
var metrics = require('../utils/MetricsUtil');
|
||||||
|
var classNames = require('classnames');
|
||||||
|
|
||||||
var _recommended = [];
|
var _recommended = [];
|
||||||
var _searchPromise = null;
|
var _searchPromise = null;
|
||||||
|
@ -132,11 +133,11 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var loadingClasses = React.addons.classSet({
|
var loadingClasses = classNames({
|
||||||
hidden: !this.state.loading,
|
hidden: !this.state.loading,
|
||||||
loading: true
|
loading: true
|
||||||
});
|
});
|
||||||
var magnifierClasses = React.addons.classSet({
|
var magnifierClasses = classNames({
|
||||||
hidden: this.state.loading,
|
hidden: this.state.loading,
|
||||||
icon: true,
|
icon: true,
|
||||||
'icon-magnifier': true,
|
'icon-magnifier': true,
|
||||||
|
|
|
@ -37,7 +37,7 @@ var _steps = [{
|
||||||
percent: 0,
|
percent: 0,
|
||||||
seconds: 5,
|
seconds: 5,
|
||||||
run: Promise.coroutine(function* (progressCallback) {
|
run: Promise.coroutine(function* (progressCallback) {
|
||||||
var cmd = '';
|
var cmd = setupUtil.copyBinariesCmd() + ' && ' + setupUtil.fixBinariesCmd();
|
||||||
|
|
||||||
if (!virtualBox.installed()) {
|
if (!virtualBox.installed()) {
|
||||||
yield virtualBox.killall();
|
yield virtualBox.killall();
|
||||||
|
@ -49,7 +49,7 @@ var _steps = [{
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
progressCallback(50); // TODO: detect when the installation has started so we can simulate progress
|
progressCallback(50); // TODO: detect when the installation has started so we can simulate progress
|
||||||
yield setupUtil.installVirtualBoxCmd();
|
yield util.exec(setupUtil.macSudoCmd(cmd));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw null;
|
throw null;
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,6 @@ var _steps = [{
|
||||||
let usersDirName = parts[parts.length-1];
|
let usersDirName = parts[parts.length-1];
|
||||||
let usersDirPath = parts.join('\\');
|
let usersDirPath = parts.join('\\');
|
||||||
let shareName = driveLetter + '/' + usersDirName;
|
let shareName = driveLetter + '/' + usersDirName;
|
||||||
|
|
||||||
yield machine.stop();
|
|
||||||
yield virtualBox.mountSharedDir(machine.name(), shareName, usersDirPath);
|
yield virtualBox.mountSharedDir(machine.name(), shareName, usersDirPath);
|
||||||
yield machine.start();
|
yield machine.start();
|
||||||
}
|
}
|
||||||
|
@ -243,6 +241,8 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
|
||||||
metrics.track('Setup Failed', {
|
metrics.track('Setup Failed', {
|
||||||
step: _currentStep,
|
step: _currentStep,
|
||||||
});
|
});
|
||||||
|
console.log(err);
|
||||||
|
console.log(err.message);
|
||||||
bugsnag.notify('SetupError', err.message, {
|
bugsnag.notify('SetupError', err.message, {
|
||||||
error: err,
|
error: err,
|
||||||
output: err.message
|
output: err.message
|
||||||
|
|
|
@ -28,6 +28,9 @@ var SetupUtil = {
|
||||||
this.checksum(util.dockerMachineBinPath()) !== this.checksum(resources.dockerMachine()) ||
|
this.checksum(util.dockerMachineBinPath()) !== this.checksum(resources.dockerMachine()) ||
|
||||||
this.checksum(util.dockerBinPath()) !== this.checksum(resources.docker());
|
this.checksum(util.dockerBinPath()) !== this.checksum(resources.docker());
|
||||||
},
|
},
|
||||||
|
copycmd: function (src, dest) {
|
||||||
|
return ['rm', '-f', dest, '&&', 'cp', src, dest];
|
||||||
|
},
|
||||||
copyBinariesCmd: function () {
|
copyBinariesCmd: function () {
|
||||||
var cmd = ['mkdir', '-p', '/usr/local/bin'];
|
var cmd = ['mkdir', '-p', '/usr/local/bin'];
|
||||||
cmd.push('&&');
|
cmd.push('&&');
|
||||||
|
|
|
@ -5,9 +5,6 @@ var path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
exec: function (args, options) {
|
exec: function (args, options) {
|
||||||
if (typeof args === 'string') {
|
|
||||||
args = args.split(' ');
|
|
||||||
}
|
|
||||||
options = options || {};
|
options = options || {};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
exec(args, options, (stderr, stdout, code) => {
|
exec(args, options, (stderr, stdout, code) => {
|
||||||
|
|
|
@ -20,7 +20,7 @@ var VirtualBox = {
|
||||||
if(util.isWindows()) {
|
if(util.isWindows()) {
|
||||||
return 'http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-Win.exe';
|
return 'http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-Win.exe';
|
||||||
} else {
|
} else {
|
||||||
return `https://github.com/kitematic/virtualbox/releases/download/${util.packagejson()['virtualbox-version']}/${this.virtualBoxFileName()}`;
|
return `https://github.com/kitematic/virtualbox/releases/download/${util.packagejson()['virtualbox-version']}/${this.filename()}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
installed: function () {
|
installed: function () {
|
||||||
|
|
Loading…
Reference in New Issue