Skip to content

Commit

Permalink
Cache ssh certificate path on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoH2O1999 committed Apr 19, 2024
1 parent b158256 commit 0d7fc4d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/builder/darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default class MacOSBuilder extends Builder {
// Handle ssl version

if (semver.lt(this.specificVersion, '3.5.0')) {
core.info('OpenSSL version 1.0.2 is already installed');
await this.installOldSsl(ssl102Url);
} else if (semver.lt(this.specificVersion, '3.9.0')) {
core.info(
'Detected version <3.9. OpenSSL version 1.1 will be installed...'
Expand Down Expand Up @@ -301,7 +301,15 @@ export default class MacOSBuilder extends Builder {
ssl,
sslContent.replace('system "make", "test"\n', '')
);
await exec.exec(`brew install ./${url.name}.rb`, [], {cwd: tempPath});
if (!this.restored && this.sslPath.length === 0) {
await exec.exec(`brew install ./${url.name}.rb`, [], {cwd: tempPath});
} else if (this.restored) {
await exec.exec(`brew post_install ./${url.name}.rb`, [], {
cwd: tempPath
});
} else {
core.info('Correct version of OpenSSl already installed');
}
let installPath = '';
await exec.exec(`brew --prefix ${url.name}`, [], {
listeners: {
Expand Down

0 comments on commit 0d7fc4d

Please sign in to comment.