Skip to content

Commit

Permalink
docker(install): don't upgrade unrelated packages when installing colima
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Nov 26, 2023
1 parent 64a550a commit fc10bff
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 @@ -135,9 +135,16 @@ export class Install {
await io.mkdirP(colimaDir);
const dockerHost = `unix://${colimaDir}/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.colimaInstalled())) {
await core.group('Installing colima', async () => {
await Exec.exec('brew', ['install', 'colima']);
await Exec.exec('brew', ['install', 'colima'], {env: envs});
});
}

Expand Down Expand Up @@ -174,7 +181,7 @@ export class Install {

// colima is already 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 fc10bff

Please sign in to comment.