1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

Merge pull request #1844 from thomasdarimont/issue/honor-machine-storage-path-for-vboxlogs

Honor MACHINE_STORAGE_PATH environment for virtualBoxLogs
This commit is contained in:
French Ben
2016-07-26 11:46:20 -07:00
committed by GitHub

View File

@@ -177,7 +177,14 @@ var DockerMachine = {
}
},
virtualBoxLogs: function (machineName = this.name()) {
let logsPath = path.join(util.home(), '.docker', 'machine', 'machines', machineName, machineName, 'Logs', 'VBox.log');
var logsPath = null;
if (process.env.MACHINE_STORAGE_PATH) {
logsPath = path.join(process.env.MACHINE_STORAGE_PATH, 'machines', machineName, machineName, 'Logs', 'VBox.log');
} else {
logsPath = path.join(util.home(), '.docker', 'machine', 'machines', machineName, machineName, 'Logs', 'VBox.log');
}
let logData = null;
try {
logData = fs.readFileSync(logsPath, 'utf8');