Skip to content

Commit

Permalink
docker(install): don't upgrade unrelated packages when installing lima
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Nov 27, 2023
1 parent a13cc1d commit 7d62442
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/docker/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,16 @@ export class Install {
await io.mkdirP(limaDir);
const dockerHost = `unix://${limaDir}/docker.sock`;

// avoid brew to upgrade unrelated packages.
let envs = Object.assign({}, process.env, {
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: '1'
}) as {
[key: string]: string;
};

if (!(await Install.limaInstalled())) {
await core.group('Installing lima', async () => {
await Exec.exec('brew', ['install', 'lima']);
await Exec.exec('brew', ['install', 'lima'], {env: envs});
});
}

Expand Down Expand Up @@ -166,7 +173,7 @@ export class Install {

// lima might already be started on the runner so env var added in download
// method is not expanded to the running process.
const envs = Object.assign({}, process.env, {
envs = Object.assign({}, envs, {
PATH: `${this.toolDir}:${process.env.PATH}`
}) as {
[key: string]: string;
Expand Down

0 comments on commit 7d62442

Please sign in to comment.