Skip to content

Commit

Permalink
Use single command to install brew general deps
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoH2O1999 committed Nov 28, 2023
1 parent 1fcdc1e commit fe9b7eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/builder/darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as exec from '@actions/exec';
import * as io from '@actions/io';
import * as tc from '@actions/tool-cache';
import * as utils from '../utils';
import {ssl102Url, sslUrl, toolName} from '../constants';
import {darwinDependencies, ssl102Url, sslUrl, toolName} from '../constants';
import Builder from './builder';
import {OS} from './patches';
import os from 'os';
Expand Down Expand Up @@ -317,9 +317,9 @@ export default class MacOSBuilder extends Builder {
}

private async installGeneralDependencies(): Promise<void> {
await exec.exec('brew install zlib', [], {ignoreReturnCode: true});
await exec.exec('brew install sqlite3', [], {ignoreReturnCode: true});
await exec.exec('brew install readline', [], {ignoreReturnCode: true});
await exec.exec(`brew install ${darwinDependencies.join(' ')}`, [], {
ignoreReturnCode: true
});
}

protected override async additionalCachePaths(): Promise<string[]> {
Expand Down
4 changes: 3 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ const ubuntuDependencies = [
'uuid-dev'
];

export {ubuntuDependencies};
const darwinDependencies = ['zlib', 'sqlite3', 'readline'];

export {darwinDependencies, ubuntuDependencies};

export type sslUrl = {
name: string;
Expand Down

0 comments on commit fe9b7eb

Please sign in to comment.