Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1844 from thomasdarimont/issue/honor-machine-stor…
Browse files Browse the repository at this point in the history
…age-path-for-vboxlogs

Honor MACHINE_STORAGE_PATH environment for virtualBoxLogs
  • Loading branch information
FrenchBen authored Jul 26, 2016
2 parents 21f605a + c05d16f commit ba7fb1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils/DockerMachineUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit ba7fb1f

Please sign in to comment.