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 Promise = require('bluebird');
|
||||
var metrics = require('../utils/MetricsUtil');
|
||||
var classNames = require('classnames');
|
||||
|
||||
var _recommended = [];
|
||||
var _searchPromise = null;
|
||||
|
@ -132,11 +133,11 @@ module.exports = React.createClass({
|
|||
);
|
||||
}
|
||||
}
|
||||
var loadingClasses = React.addons.classSet({
|
||||
var loadingClasses = classNames({
|
||||
hidden: !this.state.loading,
|
||||
loading: true
|
||||
});
|
||||
var magnifierClasses = React.addons.classSet({
|
||||
var magnifierClasses = classNames({
|
||||
hidden: this.state.loading,
|
||||
icon: true,
|
||||
'icon-magnifier': true,
|
||||
|
|
|
@ -37,7 +37,7 @@ var _steps = [{
|
|||
percent: 0,
|
||||
seconds: 5,
|
||||
run: Promise.coroutine(function* (progressCallback) {
|
||||
var cmd = '';
|
||||
var cmd = setupUtil.copyBinariesCmd() + ' && ' + setupUtil.fixBinariesCmd();
|
||||
|
||||
if (!virtualBox.installed()) {
|
||||
yield virtualBox.killall();
|
||||
|
@ -49,7 +49,7 @@ var _steps = [{
|
|||
}
|
||||
try {
|
||||
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) {
|
||||
throw null;
|
||||
}
|
||||
|
@ -73,8 +73,6 @@ var _steps = [{
|
|||
let usersDirName = parts[parts.length-1];
|
||||
let usersDirPath = parts.join('\\');
|
||||
let shareName = driveLetter + '/' + usersDirName;
|
||||
|
||||
yield machine.stop();
|
||||
yield virtualBox.mountSharedDir(machine.name(), shareName, usersDirPath);
|
||||
yield machine.start();
|
||||
}
|
||||
|
@ -243,6 +241,8 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
|
|||
metrics.track('Setup Failed', {
|
||||
step: _currentStep,
|
||||
});
|
||||
console.log(err);
|
||||
console.log(err.message);
|
||||
bugsnag.notify('SetupError', err.message, {
|
||||
error: err,
|
||||
output: err.message
|
||||
|
|
|
@ -28,6 +28,9 @@ var SetupUtil = {
|
|||
this.checksum(util.dockerMachineBinPath()) !== this.checksum(resources.dockerMachine()) ||
|
||||
this.checksum(util.dockerBinPath()) !== this.checksum(resources.docker());
|
||||
},
|
||||
copycmd: function (src, dest) {
|
||||
return ['rm', '-f', dest, '&&', 'cp', src, dest];
|
||||
},
|
||||
copyBinariesCmd: function () {
|
||||
var cmd = ['mkdir', '-p', '/usr/local/bin'];
|
||||
cmd.push('&&');
|
||||
|
|
|
@ -5,9 +5,6 @@ var path = require('path');
|
|||
|
||||
module.exports = {
|
||||
exec: function (args, options) {
|
||||
if (typeof args === 'string') {
|
||||
args = args.split(' ');
|
||||
}
|
||||
options = options || {};
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(args, options, (stderr, stdout, code) => {
|
||||
|
|
|
@ -20,7 +20,7 @@ var VirtualBox = {
|
|||
if(util.isWindows()) {
|
||||
return 'http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-Win.exe';
|
||||
} 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 () {
|
||||
|
|
Loading…
Reference in New Issue