Skip to content

Commit

Permalink
docker(install): set default timeout to start lima
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Sep 27, 2024
1 parent 98042ca commit 1b4fb10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/docker/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,13 @@ export class Install {
};

await core.group('Starting lima instance', async () => {
const limaStartTimeout = process.env.LIMA_START_TIMEOUT ? parseInt(process.env.LIMA_START_TIMEOUT) : 5 * 60 * 1000;
const limaStartArgs = ['start', `--name=${this.limaInstanceName}`];
if (process.env.LIMA_START_ARGS) {
limaStartArgs.push(process.env.LIMA_START_ARGS);
}
try {
await Exec.exec(`limactl ${limaStartArgs.join(' ')}`, [], {env: envs});
await Promise.race([Exec.exec(`limactl ${limaStartArgs.join(' ')}`, [], {env: envs}), new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout reached')), limaStartTimeout))]);
} catch (e) {
fsp
.readdir(limaDir)
Expand Down

0 comments on commit 1b4fb10

Please sign in to comment.