Skip to content

Commit

Permalink
docker(install): print ha.stderr.log on failure
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Aug 26, 2023
1 parent 5b15c95 commit 4e8d894
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/docker/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,15 @@ export class Install {
[key: string]: string;
};
await core.group('Starting colima', async () => {
await Exec.exec('colima', ['start', '--very-verbose'], {env: envs});
try {
await Exec.exec('colima', ['start', '--very-verbose'], {env: envs});
} catch (e) {
const haStderrLog = path.join(os.homedir(), '.lima', 'colima', 'ha.stderr.log');
if (fs.existsSync(haStderrLog)) {
core.info(`Printing debug logs (${haStderrLog}):\n${fs.readFileSync(haStderrLog, {encoding: 'utf8'})}`);
}
throw e;
}
});

await core.group('Create Docker context', async () => {
Expand Down

0 comments on commit 4e8d894

Please sign in to comment.